fix copysign
[vector-math.git] / src / prim.rs
index 93c79400857899351c1ecb192ecb5f21380fed2f..4b3c6ca66f8584adf3e4ed98fb234d0583b2b3e3 100644 (file)
@@ -1,6 +1,7 @@
+#[cfg(not(feature = "std"))]
+use crate::scalar::{Scalar, Value};
 use crate::{
     f16::F16,
-    scalar::{Scalar, Value},
     traits::{ConvertFrom, ConvertTo},
 };
 use core::{fmt, hash, ops};
@@ -233,7 +234,7 @@ macro_rules! impl_float {
             }
             fn copy_sign(self, sign: Self) -> Self {
                 #[cfg(feature = "std")]
-                return $float::copysign(self);
+                return $float::copysign(self, sign);
                 #[cfg(not(feature = "std"))]
                 return crate::algorithms::base::copy_sign(Scalar, Value(self), Value(sign)).0;
             }