You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be lovely to be able to take the absolute value of a dimensioned number. I am not sure how to do this best, but would be happy to work on a pull request. Sadly, abs does not seem to be in a trait in the standard library, so we'd need specific implementations for basically every primitive type as far as I can see?
The text was updated successfully, but these errors were encountered:
/// The resulting type after taking the reciprocal
typeOutput;
/// The method for taking the reciprocal
fnrecip(self) -> Self::Output;
}
impl_unary!(f32, Recip, recip);
impl_unary!(f64, Recip, recip);
Abs probably doesn't need the associated type Output. That is, unless we want to support types that change under absolute value. I can't think of what those would be outside of typenum, unless we wanted to do something like have i32::abs() return a u32, but that is probably not useful.
It would be lovely to be able to take the absolute value of a dimensioned number. I am not sure how to do this best, but would be happy to work on a pull request. Sadly, abs does not seem to be in a trait in the standard library, so we'd need specific implementations for basically every primitive type as far as I can see?
The text was updated successfully, but these errors were encountered: