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.
#[inline]
pub fn new_with_quat(q: Quat<N>) -> UnitQuat<N> {
let mut q = q;
let _ = q.normalize();
UnitQuat {
q: q
}
UnitQuat { q: q.normalize() }
}
/// Creates a new unit quaternion from Euler angles.