implement sin_cos_pi_f32
[vector-math.git] / src / prim.rs
index 08ede9e643616a73a8fe15fb189cfdf4a32e741b..184e5fcec9d5ac6d6a9a6037a14a5606b5a175e0 100644 (file)
@@ -139,6 +139,7 @@ pub trait PrimFloat:
     fn is_nan(self) -> bool;
     fn from_bits(bits: Self::BitsType) -> Self;
     fn to_bits(self) -> Self::BitsType;
+    fn abs(self) -> Self;
 }
 
 macro_rules! impl_float {
@@ -185,6 +186,9 @@ macro_rules! impl_float {
             fn to_bits(self) -> Self::BitsType {
                 self.to_bits()
             }
+            fn abs(self) -> Self {
+                $float::abs(self)
+            }
         }
     };
 }