Float
Type name: float
Rust type: f64
A float is a number that can have a fractional part, represented in decimal notation. Under the hood, floats are represented as 64-bit double-precision floating-point numbers.
<float>1.0</float>
<float>3.14</float>
<float>-2.71828</float>
<float>0.0</float>
Conversion to other types
When converting a float
to other types, it behaves exactly as you would expect: