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
Due to floating point error the magnitude of normalized vecs can be slightly over 1.0 so when the two input vecs are near identical it is possible for the dot product to be over 1 (or under -1 if they are opposite).
Unfortunately, acos returns NaN outside the range [-1, 1]
Is it intended for the user to handle this case or should it be handled in these methods?
Another concern with slerp_unclamped is that it doesn't handle the case where the two vectors are not linearly independent.
The text was updated successfully, but these errors were encountered:
For slerping I mentioned the issue with two vectors pointing in the same or opposite directions because I realized while writing that this coincides with the case where the dot product needs to be clamped. If they are pointing in almost the same direction I think returning to would be the best solution. However, if they are in the opposite direction then we have to choose from an infinite selection of planes to rotate through.
The two affected methods:
Due to floating point error the magnitude of normalized vecs can be slightly over 1.0 so when the two input vecs are near identical it is possible for the dot product to be over 1 (or under -1 if they are opposite).
Unfortunately,
acos
returns NaN outside the range [-1, 1]Is it intended for the user to handle this case or should it be handled in these methods?
Another concern with
slerp_unclamped
is that it doesn't handle the case where the two vectors are not linearly independent.The text was updated successfully, but these errors were encountered: