Trait dimensioned::dimensioned::Recip
[−]
[src]
pub trait Recip { type Output; fn recip(self) -> Self::Output; }
Recip is used for implementing a recip()
member for types that don't impl Float
.
Associated Types
type Output
Required Methods
fn recip(self) -> Self::Output
Example
use dimensioned::si::s; use dimensioned::Recip; let x = 4.0*s; let y = 0.25/s; assert_eq!(x, y.recip())
Implementors
impl<D, V> Recip for Dim<D, V> where D: Dimension + Recip, V: Float, D::Output: Dimension
impl<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole> Recip for SI<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole> where Meter: Integer + Neg, Kilogram: Integer + Neg, Second: Integer + Neg, Ampere: Integer + Neg, Kelvin: Integer + Neg, Candela: Integer + Neg, Mole: Integer + Neg, Meter::Output: Integer, Kilogram::Output: Integer, Second::Output: Integer, Ampere::Output: Integer, Kelvin::Output: Integer, Candela::Output: Integer, Mole::Output: Integer
impl<Centimeter, Gram, Second> Recip for CGS<Centimeter, Gram, Second> where Centimeter: Integer + Neg, Gram: Integer + Neg, Second: Integer + Neg, Centimeter::Output: Integer, Gram::Output: Integer, Second::Output: Integer