forked from M-Labs/nalgebra
Remove unnecessary normalization in Rotation3::face_towards
`zaxis` and `xaxis` are already normalized which means `zaxis.cross(&xaxis)` should already be normalized.
This commit is contained in:
parent
5baf86b311
commit
860899cd6d
@ -478,9 +478,10 @@ where
|
|||||||
SB: Storage<T, U3>,
|
SB: Storage<T, U3>,
|
||||||
SC: Storage<T, U3>,
|
SC: Storage<T, U3>,
|
||||||
{
|
{
|
||||||
|
// Gram–Schmidt process
|
||||||
let zaxis = dir.normalize();
|
let zaxis = dir.normalize();
|
||||||
let xaxis = up.cross(&zaxis).normalize();
|
let xaxis = up.cross(&zaxis).normalize();
|
||||||
let yaxis = zaxis.cross(&xaxis).normalize();
|
let yaxis = zaxis.cross(&xaxis);
|
||||||
|
|
||||||
Self::from_matrix_unchecked(SMatrix::<T, 3, 3>::new(
|
Self::from_matrix_unchecked(SMatrix::<T, 3, 3>::new(
|
||||||
xaxis.x.clone(),
|
xaxis.x.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user