add trunc implementation
[vector-math.git] / src / f16.rs
index 280d00d4231f751192b12a5d715cd26734318fa6..4609c58264a7979bd4aa01f4b76501de553c874b 100644 (file)
@@ -1,4 +1,5 @@
 use crate::{
+    prim::PrimFloat,
     scalar::Value,
     traits::{ConvertFrom, ConvertTo, Float},
 };
@@ -211,10 +212,7 @@ impl F16 {
         )
     }
     pub fn trunc(self) -> Self {
-        #[cfg(feature = "std")]
-        return f32::from(self).trunc().to();
-        #[cfg(not(feature = "std"))]
-        todo!();
+        return PrimFloat::trunc(f32::from(self)).to();
     }
     pub fn ceil(self) -> Self {
         #[cfg(feature = "std")]