Skip to content

Commit 310999e

Browse files
authored
fix: reader.ReadRotationPacked() "w" reconstruction (#332)
1 parent a07aa61 commit 310999e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MLAPI/Serialization/BitReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public Quaternion ReadRotationPacked()
374374
float y = ReadSinglePacked();
375375
float z = ReadSinglePacked();
376376

377-
float w = Mathf.Sqrt(1 - ((Mathf.Pow(x, 2) - (Mathf.Pow(y, 2) - (Mathf.Pow(z, 2))))));
377+
float w = Mathf.Sqrt(1f - Mathf.Pow(x, 2) - Mathf.Pow(y, 2) - Mathf.Pow(z, 2));
378378

379379
return new Quaternion(x, y, z, w);
380380
}

0 commit comments

Comments
 (0)