Trait dimensioned::traits::Cbrt[][src]

pub trait Cbrt {
    type Output;
    fn cbrt(self) -> Self::Output;
}

Cbrt provides a cbrt member function for types that are not necessarily preserved under cube root.

This is not currently implemented for built-in floating point types unless you are using std.

Example

extern crate dimensioned as dim;

fn main() {
    use dim::si;
    let x = 2.0 * si::M;
    let v = 8.0 * si::M3;

    use dim::Cbrt;
    #[cfg(feature = "std")]
    assert_eq!(v.cbrt(), x);
}

Associated Types

The resulting type after taking the cube root

Required Methods

The method for taking the cube root

Implementations on Foreign Types

impl Cbrt for f32
[src]

impl Cbrt for f64
[src]

Implementors