use nalgebra-specific SimdPartialOrd instead of the one from std
This commit is contained in:
parent
1dcb9d649b
commit
7c80b079a2
|
@ -2111,7 +2111,7 @@ impl<T: Scalar + ClosedAdd + ClosedSub + ClosedMul, R: Dim, C: Dim, S: RawStorag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: crate::SimdRealField + PartialOrd + ClosedMul, R: Dim, C: Dim, S: RawStorage<T, R, C>>
|
impl<T: crate::SimdRealField + SimdPartialOrd + ClosedMul, R: Dim, C: Dim, S: RawStorage<T, R, C>>
|
||||||
Matrix<T, R, C, S>
|
Matrix<T, R, C, S>
|
||||||
{
|
{
|
||||||
/// Calculate the right-handed angle between two vectors in radians.
|
/// Calculate the right-handed angle between two vectors in radians.
|
||||||
|
@ -2159,11 +2159,11 @@ impl<T: crate::SimdRealField + PartialOrd + ClosedMul, R: Dim, C: Dim, S: RawSto
|
||||||
let perp = -self.perp(other);
|
let perp = -self.perp(other);
|
||||||
let dot = self.dot(other);
|
let dot = self.dot(other);
|
||||||
let res: T::SimdRealField = T::SimdRealField::simd_atan2(perp, dot) % two_pi.clone();
|
let res: T::SimdRealField = T::SimdRealField::simd_atan2(perp, dot) % two_pi.clone();
|
||||||
if res < T::SimdRealField::zero() {
|
use crate::SimdBool;
|
||||||
res + two_pi
|
res.clone().simd_lt(T::SimdRealField::zero()).if_else(
|
||||||
} else {
|
|| res.clone() + two_pi,
|
||||||
res
|
|| res.clone()
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue