add sqrt_fast_f16/f32/f64
[vector-math.git] / src / scalar.rs
index 4e5009598aff43900ae158d35d4918c8e0d87140..b15388b24ef6473abab300da2fcfea8e5a3a83f1 100644 (file)
@@ -352,29 +352,35 @@ macro_rules! impl_float {
                 #[cfg(not(feature = "std"))]
                 return crate::algorithms::base::abs(Scalar, self);
             }
+            fn copy_sign(self, sign: Self) -> Self {
+                #[cfg(feature = "std")]
+                return Value(self.0.copysign(sign.0));
+                #[cfg(not(feature = "std"))]
+                return crate::algorithms::base::copy_sign(Scalar, self, sign);
+            }
             fn trunc(self) -> Self {
                 #[cfg(feature = "std")]
                 return Value(self.0.trunc());
                 #[cfg(not(feature = "std"))]
-                todo!();
+                return crate::algorithms::base::trunc(Scalar, self);
             }
             fn ceil(self) -> Self {
                 #[cfg(feature = "std")]
                 return Value(self.0.ceil());
                 #[cfg(not(feature = "std"))]
-                todo!();
+                return crate::algorithms::base::ceil(Scalar, self);
             }
             fn floor(self) -> Self {
                 #[cfg(feature = "std")]
                 return Value(self.0.floor());
                 #[cfg(not(feature = "std"))]
-                todo!();
+                return crate::algorithms::base::floor(Scalar, self);
             }
             fn round(self) -> Self {
                 #[cfg(feature = "std")]
                 return Value(self.0.round());
                 #[cfg(not(feature = "std"))]
-                todo!();
+                return crate::algorithms::base::round_to_nearest_ties_to_even(Scalar, self);
             }
             #[cfg(feature = "fma")]
             fn fma(self, a: Self, b: Self) -> Self {