Skip to content

Commit

Permalink
--fix an error - shouldn't normalize the cross product.
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner65 committed Feb 1, 2024
1 parent e4238af commit afae3b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/esp/core/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ Magnum::Math::Quaternion<T> quatRotFromTwoVectors(
return Magnum::Math::Quaternion<T>(rotAxisVec, 0).normalized();
}
const auto halfVec = (fromNorm + toNorm).normalized();
return Magnum::Math::Quaternion<T>(
Magnum::Math::cross(fromNorm, halfVec).normalized(),
Magnum::Math::dot(fromNorm, halfVec))
return Magnum::Math::Quaternion<T>(Magnum::Math::cross(fromNorm, halfVec),
Magnum::Math::dot(fromNorm, halfVec))
.normalized();
} // quatRotFromTwoVectors

Expand Down

0 comments on commit afae3b5

Please sign in to comment.