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
As discussed in #55Quantity should probably implement at least some of the num_traits. In the current implementation, the methods are just anonymous methods that happen to be named the exact same way as the corresponding methods on some of the num traits.
For dimensionless quantities, virtually any traits that f32 fulfills should be possible on Quantity<f32, Dimension::none()> as well.
Mainly I am thinking of
Float if we have either std or num-traits-libm activated, otherwise FloatCore
Pow
Inv
The following would be possible on all quantities:
Signed
Euclid
There are a few more and we'd have to look at what we need. For now, I'd probably start by moving the methods that were changed in #55 into the Float trait. Curiously, this trait isn't necessarily unit safe though, because of #57. I suppose we could overlook this for now, but I am not super happy about that.
The text was updated successfully, but these errors were encountered:
As discussed in #55
Quantity
should probably implement at least some of thenum_traits
. In the current implementation, the methods are just anonymous methods that happen to be named the exact same way as the corresponding methods on some of the num traits.For dimensionless quantities, virtually any traits that
f32
fulfills should be possible onQuantity<f32, Dimension::none()>
as well.Mainly I am thinking of
Num
,NumAssign
(andNumAssignOps
),NumRef
,NumAssignRef
RefNum
Float
if we have eitherstd
ornum-traits-libm
activated, otherwiseFloatCore
Pow
Inv
The following would be possible on all quantities:
Signed
Euclid
There are a few more and we'd have to look at what we need. For now, I'd probably start by moving the methods that were changed in #55 into the
Float
trait. Curiously, this trait isn't necessarily unit safe though, because of #57. I suppose we could overlook this for now, but I am not super happy about that.The text was updated successfully, but these errors were encountered: