add ceil and floor
[vector-math.git] / src / f16.rs
index 4609c58264a7979bd4aa01f4b76501de553c874b..b5d84d5a5020a12f7615e2c644a215593779167c 100644 (file)
@@ -215,22 +215,14 @@ impl F16 {
         return PrimFloat::trunc(f32::from(self)).to();
     }
     pub fn ceil(self) -> Self {
-        #[cfg(feature = "std")]
-        return f32::from(self).ceil().to();
-        #[cfg(not(feature = "std"))]
-        todo!();
+        return PrimFloat::ceil(f32::from(self)).to();
     }
     pub fn floor(self) -> Self {
-        #[cfg(feature = "std")]
-        return f32::from(self).floor().to();
-        #[cfg(not(feature = "std"))]
-        todo!();
+        return PrimFloat::floor(f32::from(self)).to();
     }
+    /// round to nearest, ties to unspecified
     pub fn round(self) -> Self {
-        #[cfg(feature = "std")]
-        return f32::from(self).round().to();
-        #[cfg(not(feature = "std"))]
-        todo!();
+        return PrimFloat::round(f32::from(self)).to();
     }
     #[cfg(feature = "fma")]
     pub fn fma(self, a: Self, b: Self) -> Self {