Trait dimensioned::dimensioned::Pow
[−]
[src]
pub trait Pow<Base> { type Output; fn pow(base: Base) -> Self::Output; }
Powimpl Float
and whose type signature changes when multiplying, such as Dim<D, V>
.
It uses type 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 pow(base: Base) -> Self::Output
Example
use dimensioned::si::m; use dimensioned::Pow; use dimensioned::P3; let x = 2.0*m; let y = 8.0*m*m*m; assert_eq!(P3::pow(x), y);
Implementors
impl<D, V, Exp> Pow<Dim<D, V>> for Exp where D: Dimension + Pow<Exp>, V: Float, Exp: Integer, D::Output: Dimension
impl<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole, RHS> Pow<RHS> for SI<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole> where Meter: Integer + Mul<RHS>, Kilogram: Integer + Mul<RHS>, Second: Integer + Mul<RHS>, Ampere: Integer + Mul<RHS>, Kelvin: Integer + Mul<RHS>, Candela: Integer + Mul<RHS>, Mole: Integer + Mul<RHS>, RHS: Integer, Meter::Output: Integer, Kilogram::Output: Integer, Second::Output: Integer, Ampere::Output: Integer, Kelvin::Output: Integer, Candela::Output: Integer, Mole::Output: Integer
impl<Centimeter, Gram, Second, RHS> Pow<RHS> for CGS<Centimeter, Gram, Second> where Centimeter: Integer + Mul<RHS>, Gram: Integer + Mul<RHS>, Second: Integer + Mul<RHS>, RHS: Integer, Centimeter::Output: Integer, Gram::Output: Integer, Second::Output: Integer