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 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 pow(base: Base) -> Self::Output
Example
use dimensioned::si::m; use dimensioned::{P3, Pow}; let x = 2.0*m; let y = 8.0*m*m*m; assert_eq!(P3::pow(x), y);
Implementors
impl<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole, RHS> Pow<RHS> for SI<Meter, Kilogram, Second, Ampere, Kelvin, Candela, Mole> where Meter: Peano + Mul<RHS>, Kilogram: Peano + Mul<RHS>, Second: Peano + Mul<RHS>, Ampere: Peano + Mul<RHS>, Kelvin: Peano + Mul<RHS>, Candela: Peano + Mul<RHS>, Mole: Peano + Mul<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> Pow<RHS> for CGS<Centimeter, Gram, Second> where Centimeter: Peano + Mul<RHS>, Gram: Peano + Mul<RHS>, Second: Peano + Mul<RHS>, RHS: Peano, Centimeter::Output: Peano, Gram::Output: Peano, Second::Output: Peano