Closed termoshtt closed 6 years ago
I added a submodule cast which defines four traits in num-traits::cast:
cast
num-traits::cast
ToPrimitive::to_xxx
None
im
FromPrimitive::from_xxx(a)
Complex { re: T::from_xxx(a), im: T::zero() }
AsPrimitive
NumCast
ToPrimitive
Fix 1.15.0 case
Thanks review. I fixed them.
Thanks!
bors r+
Could you release 0.2.1? or any release schedule?
Could you release 0.2.1?
Done!
I added a submodule
cast
which defines four traits innum-traits::cast
:ToPrimitive::to_xxx
returnsNone
ifim
is non-zeroFromPrimitive::from_xxx(a)
returnsComplex { re: T::from_xxx(a), im: T::zero() }
AsPrimitive
drops the imaginary part of complexNumCast
is same asToPrimitive