Trait dimensioned::dimensioned::Root
[−]
[src]
pub trait Root<Radicand> {
type Output;
fn root(radicand: Radicand) -> Self::Output;
}Rootimpl Float and whose type signature changes when taking a root, such as Dim<D, V>.
It uses Peano numbers to specify the degree.
The syntax is a little bit weird and may be subject to change.
Associated Types
type Output
Required Methods
fn root(radicand: Radicand) -> Self::Output
Example
use dimensioned::si::m; use dimensioned::{P4, Root}; let x = 2.0*m; let y = 16.0*m*m*m*m; assert_eq!(x, P4::root(x*x*x*x));
Implementors
impl<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole, RHS> Root<RHS> for SI<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole> where Meter: Peano + Div<RHS>, Kilogram: Peano + Div<RHS>, Second: Peano + Div<RHS>, Ampere: Peano + Div<RHS>, Kelvin: Peano + Div<RHS>, Candela: Peano + Div<RHS>, Mole: Peano + Div<RHS>, RHS: Peano, Meter::Output: Peano, Kilogram::Output: Peano, Second::Output: Peano, Ampere::Output: Peano, Kelvin::Output: Peano, Candela::Output: Peano, Mole::Output: Peanoimpl<Centimeter, Gram, Second, RHS> Root<RHS> for CGS<Centimeter, Gram, Second> where Centimeter: Peano + Div<RHS>, Gram: Peano + Div<RHS>, Second: Peano + Div<RHS>, RHS: Peano, Centimeter::Output: Peano, Gram::Output: Peano, Second::Output: Peano