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
The mat4 implementation kind of punts on invalid rotations, i.e. an axis with a length < EPSILON.
if (len < glMatrix.EPSILON) {
return null;
}
But is returning 'null' the correct thing to do? The calling function now has to trap these strange return values.
In the pure javascript sense, throwing an error makes more sense then returning 'null'.
In the real-world sense, doing something appropriate would make more sense. For rotate(), just return the value of the given matrix. For fromRotation(), just return the identity matrix.
The text was updated successfully, but these errors were encountered:
The mat4 implementation kind of punts on invalid rotations, i.e. an axis with a length < EPSILON.
But is returning 'null' the correct thing to do? The calling function now has to trap these strange return values.
In the pure javascript sense, throwing an error makes more sense then returning 'null'.
In the real-world sense, doing something appropriate would make more sense. For rotate(), just return the value of the given matrix. For fromRotation(), just return the identity matrix.
The text was updated successfully, but these errors were encountered: