diff --git a/src/system.rs b/src/system.rs index 1cb465f9..b9a7eb5d 100644 --- a/src/system.rs +++ b/src/system.rs @@ -797,6 +797,7 @@ macro_rules! system { } } + std! { /// Raises a quantity to an integer power. /// #[cfg_attr(all(feature = "si", feature = "f32"), doc = " ```rust")] @@ -810,22 +811,21 @@ macro_rules! system { /// * `E`: `typenum::Integer` power. #[inline(always)] pub fn powi( - self, e: E + self, _e: E ) -> Quantity<$quantities<$($crate::typenum::Prod),+>, U, V> where $(D::$symbol: $crate::lib::ops::Mul,)+ D::Kind: $crate::marker::Mul, E: $crate::typenum::Integer, - V: $crate::typenum::Pow + $crate::Conversion, + V: $crate::num::Float, { Quantity { dimension: $crate::lib::marker::PhantomData, units: $crate::lib::marker::PhantomData, - value: $crate::typenum::Pow::powi(self.value, e), + value: self.value.powi(E::to_i32()), } } - std! { /// Takes the square root of a number. Returns `NAN` if `self` is a negative /// number. ///