Fix bug in UnitQuat construction from Quat

This commit is contained in:
Eduard Bopp 2015-02-17 13:54:56 +01:00
parent 870f9afb34
commit b2a4918376
1 changed files with 1 additions and 6 deletions

View File

@ -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.