pub trait RatioExt: Sized + Copy {
const ZERO: Self;
const ONE: Self;
// Required methods
fn as_f64(self) -> f64;
fn percent_f64(self) -> f64;
}Expand description
Dimensionless fractions.
Required Associated Constants§
Required Methods§
Sourcefn percent_f64(self) -> f64
fn percent_f64(self) -> f64
The fraction as a percentage.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".