Skip to content

Commit

Permalink
Fix: rotate function needs to convert matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Jun 12, 2024
1 parent 634e2f7 commit 6aa49c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fastgltf/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ namespace fastgltf::math {
/** Rotates the given matrix using the given quaternion */
FASTGLTF_EXPORT template <typename T>
[[nodiscard]] auto rotate(const mat<T, 4, 4>& m, const quat<T>& rot) noexcept {
return m * asMatrix(rot);
return m * mat<T, 4, 4>(asMatrix(rot));
}

FASTGLTF_EXPORT template <std::size_t N, std::size_t M> using fmat = mat<float, N, M>;
Expand Down

0 comments on commit 6aa49c3

Please sign in to comment.