You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where Matrix4f#get(Quat4f) will returns NaN as the quaternion. The issue is related to the ww calculation that can ends up with a negative value. This situation was taken care by the if statement using a ternary operator but not by the Math.sqrt juste below, where the code passes the ww value without consideration for possible negative values.
Simply replacing Math.sqrt(ww) by Math.sqrt(Math.abs(ww)) solved the issue. Even though the get didn't return exactly the same quaternion, it returned an equivalent such as applying both quaternion to the same vector will return the same transformed vector.
There is an issue where Matrix4f#get(Quat4f) will returns NaN as the quaternion. The issue is related to the ww calculation that can ends up with a negative value. This situation was taken care by the if statement using a ternary operator but not by the Math.sqrt juste below, where the code passes the ww value without consideration for possible negative values.
Simply replacing Math.sqrt(ww) by Math.sqrt(Math.abs(ww)) solved the issue. Even though the get didn't return exactly the same quaternion, it returned an equivalent such as applying both quaternion to the same vector will return the same transformed vector.
To test the issue:
The text was updated successfully, but these errors were encountered: