[−][src]Trait metfor::Quantity
A quantity is a common super trait for types that represent units of measurement.
Required methods
fn pack(_: f64) -> Self
Create a new instance of self by wrapping a value
fn unpack(self) -> f64
Unpack a wrapped value without any error checking.
fn unwrap(self) -> f64
Unwrap the value from the new type and check for validity, panic if contents are invalid.
fn into_option(self) -> Option<f64>
Convert into an option that is None
if the content is invalid.
Provided methods
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
Self: From<RHS> + From<TOL> + Quantity,
Test whether these two values are close
fn abs(self) -> Self
Test whether these two values are close