[][src]Trait airmash_protocol::Sqrt

pub trait Sqrt {
    type Output;
    fn sqrt(self) -> Self::Output;
}

Sqrt provides a sqrt member function for types that are not necessarily preserved under square root.

Example

extern crate dimensioned as dim;

fn main() {
    use dim::si;
    let x = 2.0 * si::M;
    let a = 4.0 * si::M2;

    use dim::Sqrt;
    assert_eq!(a.sqrt(), x);
}

Associated Types

type Output

The resulting type after taking the square root

Loading content...

Required methods

fn sqrt(self) -> Self::Output

The method for taking the square root

Loading content...

Implementations on Foreign Types

impl Sqrt for f64
[src]

type Output = f64

impl<V, U> Sqrt for SI<V, U> where
    U: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    V: Sqrt
[src]

type Output = SI<<V as Sqrt>::Output, <U as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output>

impl<V, U> Sqrt for MKS<V, U> where
    U: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    V: Sqrt
[src]

type Output = MKS<<V as Sqrt>::Output, <U as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output>

impl<V, U> Sqrt for UCUM<V, U> where
    U: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    V: Sqrt
[src]

type Output = UCUM<<V as Sqrt>::Output, <U as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output>

impl<V, U> Sqrt for FPS<V, U> where
    U: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    V: Sqrt
[src]

type Output = FPS<<V as Sqrt>::Output, <U as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output>

impl Sqrt for f32
[src]

type Output = f32

impl<V, U> Sqrt for CGS<V, U> where
    U: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    V: Sqrt
[src]

type Output = CGS<<V as Sqrt>::Output, <U as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output>

Loading content...

Implementors

impl<V, U> Sqrt for AirmashUnits<V, U> where
    V: Sqrt,
    U: PartialDiv<P2>, 

type Output = AirmashUnits<<V as Sqrt>::Output, PartialQuot<U, P2>>

Loading content...