fix copysign
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 14 May 2021 01:24:53 +0000 (18:24 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 14 May 2021 01:24:53 +0000 (18:24 -0700)
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;
             }