Skip to content

Commit

Permalink
Merge pull request #1248 from AlexanderEkdahl/patch-1
Browse files Browse the repository at this point in the history
Remove unnecessary normalization in `Rotation3::face_towards`
  • Loading branch information
sebcrozet committed Jul 8, 2023
2 parents 17f5ec1 + 860899c commit b6abfee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/geometry/rotation_specialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,10 @@ where
SB: Storage<T, U3>,
SC: Storage<T, U3>,
{
// Gram–Schmidt 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(),
Expand Down

0 comments on commit b6abfee

Please sign in to comment.