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:
Alexander Ekdahl 2023-06-19 15:20:01 +02:00 committed by GitHub
parent 5baf86b311
commit 860899cd6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -478,9 +478,10 @@ where
SB: Storage<T, U3>,
SC: Storage<T, U3>,
{
// GramSchmidt process
let zaxis = dir.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(
xaxis.x.clone(),