Use native `to_degrees`/`to_radians`
This commit is contained in:
parent
d201882c61
commit
f8a61962ba
|
@ -1285,16 +1285,12 @@ macro_rules! float_impl {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_degrees(self) -> Self {
|
fn to_degrees(self) -> Self {
|
||||||
// NB: `f32` didn't stabilize this until 1.7
|
<$T>::to_degrees(self)
|
||||||
// <$T>::to_degrees(self)
|
|
||||||
self * (180. / ::core::$T::consts::PI)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_radians(self) -> Self {
|
fn to_radians(self) -> Self {
|
||||||
// NB: `f32` didn't stabilize this until 1.7
|
<$T>::to_radians(self)
|
||||||
// <$T>::to_radians(self)
|
|
||||||
self * (::core::$T::consts::PI / 180.)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
|
|
Loading…
Reference in New Issue