Fix a scaling snafu in Mat4Decompose.

Found when checking how rotation affects non-uniform scaling (haven't
written proper tests yet: need to figure out how).
This commit is contained in:
Bill Currie 2012-05-09 21:07:44 +09:00
parent 82abd5e426
commit 8cea6b0a1e

View file

@ -890,7 +890,7 @@ Mat4Decompose (const mat4_t m, quat_t rot, vec3_t scale, vec3_t shear,
scl[2] = sqrt (l);
shr[1] /= scl[2];
shr[2] /= scl[2];
VectorScale (row[0], 1/scl[2], row[0]);
VectorScale (row[2], 1/scl[2], row[2]);
if (scale)
VectorCopy (scl, scale);
if (shear)