From f8a61962ba8054c46e5797494fb38a2d8100b374 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Wed, 7 Jun 2017 12:05:53 +0200 Subject: [PATCH] Use native `to_degrees`/`to_radians` --- traits/src/float.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/traits/src/float.rs b/traits/src/float.rs index 9fbe635..bb48dff 100644 --- a/traits/src/float.rs +++ b/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")]