Trait dimensioned::dimensioned::Sqrt [] [src]

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

Sqrt is used for implementing a sqrt() member for types that don't impl Float.

Associated Types

type Output

Required Methods

fn sqrt(self) -> Self::Output

Take a square root.

Example

use dimensioned::si::m;
use dimensioned::Sqrt;

let x = 2.0*m;
let y = 4.0*m*m;
assert_eq!(x, y.sqrt());

Implementors