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
/// Computes the effect of the exponent on the sign.
#[inline]
fnpowsign<T:Integer>(sign:Sign,other:&T) -> Sign{
if other.is_zero(){
Plus
}elseif sign != Minus || other.is_odd(){
sign
}else{
-sign
}
}
I was hesitant to add public Sign powers during the initial Pow review, #54 (comment), and I'm still not sure about it. It's not really the intention for Sign to act like a complete mathematical entity on its own. Can you explain more about why fraction would want this? It looks like they have their own Sign anyway.
The multiplication method is provided, but raising a sign to an integer power is also a common use-case I think?
or in an impl:
I came here, because
fraction
crate usesSign
, which I use.The text was updated successfully, but these errors were encountered: