fix: #2674 - Quaternion Compression LargestAbsoluteComponentIndex largest absolute was accidentally initialized with largest, instead of largest absolute

This commit is contained in:
vis2k 2021-08-07 21:27:18 +08:00
parent c5080d1ab3
commit 2aa791a726

View File

@ -18,8 +18,8 @@ public static int LargestAbsoluteComponentIndex(Vector4 value, out float largest
// convert to abs
Vector4 abs = new Vector4(Mathf.Abs(value.x), Mathf.Abs(value.y), Mathf.Abs(value.z), Mathf.Abs(value.w));
// set largest to first value (x)
largest = value.x;
// set largest to first abs (x)
largest = abs.x;
withoutLargest = new Vector3(value.y, value.z, value.w);
int index = 0;