Trait sampara::sample::Sqrt[][src]

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

Required methods

fn sqrt(self) -> Self[src]

Square root.

use sampara::sample::Sqrt;

fn main() {
    assert_eq!(4.0_f32.sqrt(), 2.0);
    assert_eq!(2.0_f64.sqrt(), 1.4142135623730951);
    assert!((-1.0_f64).sqrt().is_nan());
}
Loading content...

Implementations on Foreign Types

impl Sqrt for f32[src]

impl Sqrt for f64[src]

Loading content...

Implementors

Loading content...