projects
/
vector-math.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e218830
)
fix copysign
author
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 14 May 2021 01:24:53 +0000
(18:24 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 14 May 2021 01:24:53 +0000
(18:24 -0700)
src/prim.rs
patch
|
blob
|
history
diff --git
a/src/prim.rs
b/src/prim.rs
index 93c79400857899351c1ecb192ecb5f21380fed2f..4b3c6ca66f8584adf3e4ed98fb234d0583b2b3e3 100644
(file)
--- 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;
}