Skip to content

Commit cbdd4ad

Browse files
authored
ConvertToRightHandedRotation: Fix comparison (#16525)
Without this, we fail the zero rotation (and/or identity quaternion) cases :)
1 parent 50a59ec commit cbdd4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export function ConvertToRightHandedRotation(value: Quaternion): Quaternion {
204204
* q is the input quaternion, and q' is the converted quaternion.
205205
* Reference: https://d3cw3dd2w32x2b.cloudfront.net/wp-content/uploads/2015/01/matrix-to-quat.pdf
206206
*/
207-
if (value.x * value.x + value.y * value.y < 0.5) {
207+
if (value.x * value.x + value.y * value.y > 0.5) {
208208
const absX = Math.abs(value.x);
209209
const absY = Math.abs(value.y);
210210
if (absX > absY) {

0 commit comments

Comments
 (0)