From: Jacob Lifshay Date: Fri, 14 May 2021 01:24:53 +0000 (-0700) Subject: fix copysign X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85c48728e7c1eb44f3892c15f155e58bfa64fe8c;p=vector-math.git fix copysign --- diff --git a/src/prim.rs b/src/prim.rs index 93c7940..4b3c6ca 100644 --- a/src/prim.rs +++ b/src/prim.rs @@ -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; }