Skip to content

Commit

Permalink
Fixed bug in vsg::decompose(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Sep 29, 2023
1 parent c512bd6 commit 7308488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vsg/maths/maths_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ bool t_decompose(const t_mat4<T>& m, t_vec3<T>& translation, t_quat<T>& rotation

auto root = sqrt(rm[i][i] - rm[j][j] - rm[k][k] + static_cast<T>(1.0));
auto half_inv_root = static_cast<T>(0.5) / root;
rotation[i] = static_cast<T>(0.5) / root;
rotation[i] = static_cast<T>(0.5) * root;
rotation[j] = half_inv_root * (rm[i][j] + rm[j][i]);
rotation[k] = half_inv_root * (rm[i][k] + rm[k][i]);
rotation[3] = half_inv_root * (rm[j][k] - rm[k][j]);
Expand Down

0 comments on commit 7308488

Please sign in to comment.