Browse Source

Use native `to_degrees`/`to_radians`

Vinzent Steinberg 7 years ago
parent
commit
f8a61962ba
1 changed files with 2 additions and 6 deletions
  1. 2 6
      traits/src/float.rs

+ 2 - 6
traits/src/float.rs

@@ -1285,16 +1285,12 @@ macro_rules! float_impl {
 
             #[inline]
             fn to_degrees(self) -> Self {
-                // NB: `f32` didn't stabilize this until 1.7
-                // <$T>::to_degrees(self)
-                self * (180. / ::core::$T::consts::PI)
+                <$T>::to_degrees(self)
             }
 
             #[inline]
             fn to_radians(self) -> Self {
-                // NB: `f32` didn't stabilize this until 1.7
-                // <$T>::to_radians(self)
-                self * (::core::$T::consts::PI / 180.)
+                <$T>::to_radians(self)
             }
 
             #[cfg(feature = "std")]