Skip to content

Commit f09a6a0

Browse files
authored
Correct translation calculation in recomposition of decomposed transform
As far as I can tell, this calculation for recomposing the transform is incorrect. If you apply the given pseudocode description of decomposing and recomposing to the following matrix: ``` [ 1 1 10 0 1 20 ] ``` Then you'd expect to get back the same matrix (decompose & recompose should be inverse functions). However, if you follow the specification as given, then you get back something else.
1 parent ce08997 commit f09a6a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css-transforms-1/Overview.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,8 +1346,8 @@ matrix[1][0] = m21
13461346
matrix[1][1] = m22
13471347

13481348
// Translate matrix.
1349-
matrix[3][0] = translate[0] * m11 + translate[1] * m21
1350-
matrix[3][1] = translate[0] * m12 + translate[1] * m22
1349+
matrix[3][0] = translate[0]
1350+
matrix[3][1] = translate[1]
13511351

13521352
// Rotate matrix.
13531353
angle = deg2rad(angle);

0 commit comments

Comments
 (0)