Trait dimensioned::traits::Recip [] [src]

pub trait Recip {
    type Output;
    fn recip(self) -> Self::Output;
}

Recip is used for implementing a recip() member for types that are not preserved under reciprocal.

Example

extern crate dimensioned as dim;
use dim::si;

fn main() {
    let t = 2.0 * si::S;
    let f = 0.5 * si::HZ;

    use dim::Recip;
    assert_eq!(t.recip(), f);
}

Associated Types

The resulting type after taking the reciprocal

Required Methods

The method for taking the reciprocal

Implementors