Trait RealConv
pub trait RealConv {
// Required methods
fn as_f32(self) -> f32;
fn as_f64(self) -> f64;
fn from_f32(f: f32) -> Self;
fn from_f64(f: f64) -> Self;
}Expand description
Convenience conversion between real and f32/f64.
Clippy often complains if you do f as f64 when f is already an f64. This trait exists to make it easy to
convert between the different reals and floats without a lot of allowing clippy lints for your code.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".