Trait figures::FloatConversion
source · pub trait FloatConversion {
type Float;
// Required methods
fn into_float(self) -> Self::Float;
fn from_float(float: Self::Float) -> Self;
}
Expand description
Converts a type to its floating point representation.
This trait exists because there is no trait in Rust to peform x as f32
.
Required Associated Types§
Required Methods§
sourcefn into_float(self) -> Self::Float
fn into_float(self) -> Self::Float
Returns this value in floating point form.
sourcefn from_float(float: Self::Float) -> Self
fn from_float(float: Self::Float) -> Self
Converts from floating point to this form.
Object Safety§
This trait is not object safe.