Fix wrong sign in UnitComplex::axis_angle

This commit is contained in:
Sébastien Crozet 2021-08-07 21:22:32 +02:00
parent 1bc919e0db
commit a9ed6cb621
1 changed files with 3 additions and 3 deletions

View File

@ -144,10 +144,10 @@ where
if ang.is_zero() {
None
} else if ang.is_sign_negative() {
Some((Unit::new_unchecked(Vector1::x()), -ang.clone()))
} else if ang.is_sign_positive() {
Some((Unit::new_unchecked(Vector1::x()), ang))
} else {
Some((Unit::new_unchecked(-Vector1::<T>::x()), ang))
Some((Unit::new_unchecked(-Vector1::<T>::x()), -ang))
}
}