@@ -681,7 +681,7 @@ <h3 id=unmatrix><span class=secno>7.2. </span>Unmatrix</h3>
681681 < pre >
682682 Input: matrix ; a 4x4 matrix
683683 Output: translate ; a 3 component vector
684- rotate ; euler angles, represented as a 3 component vector
684+ rotate ; Euler angles, represented as a 3 component vector
685685 scale ; a 3 component vector
686686 skew ; skew factors XY,XZ,YZ represented as a 3 component vector
687687 perspective ; a 4 component vector
@@ -713,15 +713,15 @@ <h3 id=unmatrix><span class=secno>7.2. </span>Unmatrix</h3>
713713 if (matrix[3][3] == 0)
714714 return false
715715
716- for (i = 0; i < 4 ; i++)
717- for (j = 0; j < 4; j++)
716+ for (i = 0; i < 4; i++)
717+ for (j = 0; j < 4; j++)
718718 matrix[i][j] /= matrix[3][3]
719719
720720 // perspectiveMatrix is used to solve for perspective, but it also provides
721721 // an easy way to test for singularity of the upper 3x3 component.
722722 perspectiveMatrix = matrix
723723
724- for (i = 0; i < 3 ; i++)
724+ for (i = 0; i < 3; i++)
725725 perspectiveMatrix[i][3] = 0
726726
727727 perspectiveMatrix[3][3] = 1
@@ -760,7 +760,7 @@ <h3 id=unmatrix><span class=secno>7.2. </span>Unmatrix</h3>
760760 matrix[3][2] = 0
761761
762762 // Now get scale and shear. 'row' is a 3 element array of 3 component vectors
763- for (i = 0; i < 3; i++)
763+ for (i = 0; i < 3; i++)
764764 row[i][0] = matrix[i][0]
765765 row[i][1] = matrix[i][1]
766766 row[i][2] = matrix[i][2]
@@ -778,7 +778,7 @@ <h3 id=unmatrix><span class=secno>7.2. </span>Unmatrix</h3>
778778 row[1] = normalize(row[1])
779779 skew[0] /= scale[1];
780780
781- // Compute XZ and YZ shears, orthogonalize 3rd row
781+ // Compute XZ and YZ shears, make 3rd row orthogonal
782782 skew[1] = dot(row[0], row[2])
783783 row[2] = combine(row[2], row[0], 1.0, -skew[1])
784784 skew[2] = dot(row[1], row[2])
@@ -794,8 +794,8 @@ <h3 id=unmatrix><span class=secno>7.2. </span>Unmatrix</h3>
794794 // Check for a coordinate system flip. If the determinant
795795 // is -1, then negate the matrix and the scaling factors.
796796 pdum3 = cross(row[1], row[2])
797- if (dot(row[0], pdum3) < 0)
798- for (i = 0; i < 3; i++) {
797+ if (dot(row[0], pdum3) < 0)
798+ for (i = 0; i < 3; i++) {
799799 scale[0] *= -1;
800800 row[i][0] *= -1
801801 row[i][1] *= -1
@@ -818,9 +818,8 @@ <h3 id=animating-the-components><span class=secno>7.3. </span>Animating the
818818 < p > Once decomposed, each component of each returned value of the source
819819 matrix is linearly interpolated with the corresponding component of the
820820 destination matrix. For instance, the translate[0], translate[1] and
821- translate[2] values are interpolated as any other numeric value (see CSS3
822- Animations spec), and the result is used to set the translation of the
823- animating element.
821+ translate[2] values are interpolated numerically, and the result is used
822+ to set the translation of the animating element.
824823
825824 < h3 id =recomposing-the-matrix > < span class =secno > 7.4. </ span > Recomposing the
826825 matrix</ h3 >
0 commit comments