Fix bug in UnitQuat construction from Quat
This commit is contained in:
parent
870f9afb34
commit
b2a4918376
|
@ -195,12 +195,7 @@ impl<N: BaseFloat> UnitQuat<N> {
|
||||||
/// The input quaternion will be normalized.
|
/// The input quaternion will be normalized.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new_with_quat(q: Quat<N>) -> UnitQuat<N> {
|
pub fn new_with_quat(q: Quat<N>) -> UnitQuat<N> {
|
||||||
let mut q = q;
|
UnitQuat { q: q.normalize() }
|
||||||
let _ = q.normalize();
|
|
||||||
|
|
||||||
UnitQuat {
|
|
||||||
q: q
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new unit quaternion from Euler angles.
|
/// Creates a new unit quaternion from Euler angles.
|
||||||
|
|
Loading…
Reference in New Issue