Commit 42ded7b6 authored by cmarrin@apple.com's avatar cmarrin@apple.com

2010-04-30 Chris Marrin <cmarrin@apple.com>

        Reviewed by Simon Fraser.

        Reversed the order of the CSSMatrix.multiply method
        https://bugs.webkit.org/show_bug.cgi?id=38337

        * css/WebKitCSSMatrix.cpp:
        (WebCore::WebKitCSSMatrix::multiply):
        * platform/graphics/transforms/TransformationMatrix.cpp:

        These are the existing tests for 2D and 3D CSSMatrix and SVGMatrix.
        I've added tests missing between the two styles and now do tests
        that confirm that SVGMatrix and CSSMatrix both multiply the same.

        This also adds a new test from Simon which compares SVG to CSS matrixes.
        This is a pixel test for mac only.

        * platform/mac/transforms/svg-vs-css-expected.checksum: Added.
        * platform/mac/transforms/svg-vs-css-expected.png: Added.
        * platform/mac/transforms/svg-vs-css-expected.txt: Added.
        * svg/dom/SVGMatrix-interface-expected.txt:
        * svg/dom/SVGMatrix-interface.xhtml:
        * transforms/cssmatrix-2d-interface-expected.txt:
        * transforms/cssmatrix-2d-interface.xhtml:
        * transforms/cssmatrix-3d-interface-expected.txt:
        * transforms/cssmatrix-3d-interface.xhtml:
        * transforms/svg-vs-css.xhtml: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cc4dfdaa
2010-04-30 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Reversed the order of the CSSMatrix.multiply method
https://bugs.webkit.org/show_bug.cgi?id=38337
These are the existing tests for 2D and 3D CSSMatrix and SVGMatrix.
I've added tests missing between the two styles and now do tests
that confirm that SVGMatrix and CSSMatrix both multiply the same.
This also adds a new test from Simon which compares SVG to CSS matrixes.
This is a pixel test for mac only.
* platform/mac/transforms/svg-vs-css-expected.checksum: Added.
* platform/mac/transforms/svg-vs-css-expected.png: Added.
* platform/mac/transforms/svg-vs-css-expected.txt: Added.
* svg/dom/SVGMatrix-interface-expected.txt:
* svg/dom/SVGMatrix-interface.xhtml:
* transforms/cssmatrix-2d-interface-expected.txt:
* transforms/cssmatrix-2d-interface.xhtml:
* transforms/cssmatrix-3d-interface-expected.txt:
* transforms/cssmatrix-3d-interface.xhtml:
* transforms/svg-vs-css.xhtml: Added.
2010-04-30 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, expectations update.
......
bc6222fb80bc8f7759c51a283b4e4212
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x578
RenderBlock {html} at (0,0) size 800x578
RenderBody {body} at (8,8) size 784x562
RenderBlock {div} at (10,10) size 220x542
RenderBlock {h2} at (0,19) size 220x28
RenderText {#text} at (0,0) size 120x28
text run at (0,0) width 120: "SVG nested"
RenderBlock {h2} at (0,285) size 220x28
RenderText {#text} at (0,0) size 114x28
text run at (0,0) width 114: "CSS nested"
RenderText {#text} at (240,0) size 4x18
text run at (240,0) width 4: " "
RenderBlock {div} at (254,10) size 220x542
RenderBlock {h2} at (0,19) size 220x28
RenderText {#text} at (0,0) size 162x28
text run at (0,0) width 162: "SVG compound"
RenderBlock {h2} at (0,285) size 220x28
RenderText {#text} at (0,0) size 156x28
text run at (0,0) width 156: "CSS compound"
RenderText {#text} at (484,0) size 4x18
text run at (484,0) width 4: " "
RenderBlock {div} at (498,10) size 220x542
RenderBlock {h2} at (0,19) size 220x28
RenderText {#text} at (0,0) size 128x28
text run at (0,0) width 128: "SVG Matrix"
RenderBlock {h2} at (0,285) size 220x28
RenderText {#text} at (0,0) size 116x28
text run at (0,0) width 116: "CSSMatrix"
RenderText {#text} at (0,0) size 0x0
layer at (28,84) size 201x205
RenderBlock (relative positioned) {div} at (10,66) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
RenderSVGRoot {svg} at (29,85) size 200x200
RenderSVGContainer {g} at (29,108) size 196x174 [transform={m=((1.00,0.00)(0.00,1.00)) t=(75.00,25.00)}]
RenderPath {rect} at (103,109) size 62x62 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [data="M0.00,0.00 L60.00,0.00 L60.00,60.00 L0.00,60.00 Z"]
RenderSVGContainer {g} at (29,108) size 197x174 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
RenderPath {rect} at (102,108) size 124x124 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [data="M0.00,0.00 L60.00,0.00 L60.00,60.00 L0.00,60.00 Z"]
RenderPath {rect} at (29,106) size 163x178 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L60.00,0.00 L60.00,60.00 L0.00,60.00 Z"]
RenderText {#text} at (0,0) size 0x0
layer at (28,350) size 200x200
RenderBlock (relative positioned) {div} at (10,332) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
layer at (29,351) size 60x60
RenderBlock (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
layer at (30,352) size 60x60
RenderBlock (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
layer at (31,353) size 60x60
RenderBlock (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
layer at (272,84) size 201x205
RenderBlock (relative positioned) {div} at (10,66) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
RenderSVGRoot {svg} at (273,85) size 200x200
RenderPath {rect} at (273,107) size 163x176 [transform={m=((1.41,1.41)(-1.41,1.41)) t=(75.00,25.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L60.00,0.00 L60.00,60.00 L0.00,60.00 Z"]
RenderText {#text} at (0,0) size 0x0
layer at (272,350) size 200x200
RenderBlock (relative positioned) {div} at (10,332) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
layer at (273,351) size 60x60
RenderBlock (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
layer at (516,84) size 201x205
RenderBlock (relative positioned) {div} at (10,66) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
RenderSVGRoot {svg} at (517,85) size 200x200
RenderPath {rect} at (517,107) size 163x176 [transform={m=((1.41,1.41)(-1.41,1.41)) t=(75.00,25.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L60.00,0.00 L60.00,60.00 L0.00,60.00 Z"]
RenderText {#text} at (0,0) size 0x0
layer at (516,350) size 200x200
RenderBlock (relative positioned) {div} at (10,332) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
layer at (517,351) size 60x60
RenderBlock (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
......@@ -143,6 +143,14 @@ PASS parseFloat(m.e) is 0
PASS parseFloat(m.f) is 0
Test multiply
PASS parseFloat(m3.a) is 31
PASS parseFloat(m3.b) is 46
PASS parseFloat(m3.c) is 39
PASS parseFloat(m3.d) is 58
PASS parseFloat(m3.e) is 52
PASS parseFloat(m3.f) is 76
Test that multiply works in the right direction
PASS m.a is 2
PASS m.b is 0
PASS m.c is 0
......@@ -184,7 +192,7 @@ PASS parseFloat(m.e) is 10
PASS parseFloat(m.f) is 20
Test throwing exception from inverse
PASS m.inverse() threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS m.inverse() threw exception Error: SVG_MATRIX_NOT_INVERTABLE: DOM SVG Exception 2.
PASS successfullyParsed is true
......
......@@ -191,6 +191,30 @@ shouldBe('parseFloat(m.f)', '0');
debug("");
debug("Test multiply");
m = svgroot.createSVGMatrix();
m.a = 1;
m.b = 2;
m.c = 3;
m.d = 4;
m.e = 5;
m.f = 6;
m2 = svgroot.createSVGMatrix();
m2.a = 7;
m2.b = 8;
m2.c = 9;
m2.d = 10;
m2.e = 11;
m2.f = 12;
var m3 = m.multiply(m2);
shouldBe('parseFloat(m3.a)', '31');
shouldBe('parseFloat(m3.b)', '46');
shouldBe('parseFloat(m3.c)', '39');
shouldBe('parseFloat(m3.d)', '58');
shouldBe('parseFloat(m3.e)', '52');
shouldBe('parseFloat(m3.f)', '76');
debug("");
debug("Test that multiply works in the right direction");
var tx = svgroot.createSVGMatrix();
var sx = svgroot.createSVGMatrix();
tx = tx.translate(100,0);
......@@ -251,7 +275,9 @@ shouldBe('parseFloat(m.f)', '20');
debug("");
debug("Test throwing exception from inverse");
m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible
m = svgroot.createSVGMatrix();
m.a = 0;
m.c = 0;
shouldThrow('m.inverse()');
debug("");
......
......@@ -58,51 +58,13 @@ PASS m.setMatrixValue("banana") threw exception Error: SYNTAX_ERR: DOM Exception
PASS m.setMatrixValue("translate(10em, 20%)") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS m.setMatrixValue("translate(10px, 20px) scale()") threw exception Error: SYNTAX_ERR: DOM Exception 12.
Test multiply
PASS parseFloat(m3.a) is 25
PASS parseFloat(m3.b) is 28
PASS parseFloat(m3.c) is 57
PASS parseFloat(m3.d) is 64
PASS parseFloat(m3.e) is 100
PASS parseFloat(m3.f) is 112
Test multiply with missing argument
PASS m2 is null
Test immutability of multiply
PASS parseFloat(m.a) is 1
PASS parseFloat(m.b) is 2
PASS parseFloat(m.c) is 3
PASS parseFloat(m.d) is 4
PASS parseFloat(m.e) is 5
PASS parseFloat(m.f) is 6
Test inverse
PASS parseFloat(m2.a) is 0.5
PASS parseFloat(m2.b) is 0
PASS parseFloat(m2.c) is 0
PASS parseFloat(m2.d) is 0.5
PASS parseFloat(m2.e) is -5
PASS parseFloat(m2.f) is -10
Test immutability of inverse
PASS parseFloat(m.a) is 2
PASS parseFloat(m.b) is 0
PASS parseFloat(m.c) is 0
PASS parseFloat(m.d) is 2
PASS parseFloat(m.e) is 10
PASS parseFloat(m.f) is 20
Test throwing exception from inverse
PASS m.inverse() threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
Test translate
Test attributes on translate() and accumulation
PASS m2.a is 1
PASS m2.b is 0
PASS m2.c is 0
PASS m2.d is 1
PASS m2.e is 10
PASS m2.f is 20
PASS m2.e is 100
PASS m2.f is 50
Test immutability of translate
PASS parseFloat(m.a) is 1
......@@ -112,21 +74,37 @@ PASS parseFloat(m.d) is 1
PASS parseFloat(m.e) is 0
PASS parseFloat(m.f) is 0
Test scale
PASS m2.a is 10
PASS m2.b is 0
PASS m2.c is 0
PASS m2.d is 20
PASS m2.e is 0
PASS m2.f is 0
Test attributes on scale()
PASS m3.a is 5
PASS m3.b is 0
PASS m3.c is 0
PASS m3.d is 5
PASS m3.e is 100
PASS m3.f is 50
Test immutability of scale
PASS parseFloat(m.a) is 1
PASS parseFloat(m.b) is 0
PASS parseFloat(m.c) is 0
PASS parseFloat(m.d) is 1
PASS parseFloat(m.e) is 0
PASS parseFloat(m.f) is 0
Test immutability of scale()
PASS parseFloat(m2.a) is 1
PASS parseFloat(m2.b) is 0
PASS parseFloat(m2.c) is 0
PASS parseFloat(m2.d) is 1
PASS parseFloat(m2.e) is 100
PASS parseFloat(m2.f) is 50
Test attributes on non-uniform scale()
PASS m4.a is 10
PASS m4.b is 0
PASS m4.c is 0
PASS m4.d is 5
PASS m4.e is 100
PASS m4.f is 50
Test immutability of non-uniform scale()
PASS parseFloat(m3.a) is 5
PASS parseFloat(m3.b) is 0
PASS parseFloat(m3.c) is 0
PASS parseFloat(m3.d) is 5
PASS parseFloat(m3.e) is 100
PASS parseFloat(m3.f) is 50
Test rotate
PASS parseFloat(m2.a.toPrecision(6)) is 0.984808
......@@ -144,6 +122,58 @@ PASS parseFloat(m.d) is 1
PASS parseFloat(m.e) is 0
PASS parseFloat(m.f) is 0
Test multiply
PASS parseFloat(m3.a) is 31
PASS parseFloat(m3.b) is 46
PASS parseFloat(m3.c) is 39
PASS parseFloat(m3.d) is 58
PASS parseFloat(m3.e) is 52
PASS parseFloat(m3.f) is 76
Test that multiply works in the right direction
PASS m.a is 2
PASS m.b is 0
PASS m.c is 0
PASS m.d is 1
PASS m.e is 100
PASS m.f is 0
Test immutability of multiply
PASS tx.a is 1
PASS tx.b is 0
PASS tx.c is 0
PASS tx.d is 1
PASS tx.e is 100
PASS tx.f is 0
PASS sx.a is 2
PASS sx.b is 0
PASS sx.c is 0
PASS sx.d is 1
PASS sx.e is 0
PASS sx.f is 0
Test multiply with missing argument
PASS m2 is null
Test inverse
PASS parseFloat(m2.a) is 0.5
PASS parseFloat(m2.b) is 0
PASS parseFloat(m2.c) is 0
PASS parseFloat(m2.d) is 0.5
PASS parseFloat(m2.e) is -5
PASS parseFloat(m2.f) is -10
Test immutability of inverse
PASS parseFloat(m.a) is 2
PASS parseFloat(m.b) is 0
PASS parseFloat(m.c) is 0
PASS parseFloat(m.d) is 2
PASS parseFloat(m.e) is 10
PASS parseFloat(m.f) is 20
Test throwing exception from inverse
PASS m.inverse() threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -102,68 +102,16 @@ shouldThrow('m.setMatrixValue("translate(10em, 20%)")');
shouldThrow('m.setMatrixValue("translate(10px, 20px) scale()")');
debug("");
debug("Test multiply");
m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = new WebKitCSSMatrix("matrix(7, 8, 9, 10, 11, 12)");
var m3 = m.multiply(m2);
shouldBe('parseFloat(m3.a)', '25');
shouldBe('parseFloat(m3.b)', '28');
shouldBe('parseFloat(m3.c)', '57');
shouldBe('parseFloat(m3.d)', '64');
shouldBe('parseFloat(m3.e)', '100');
shouldBe('parseFloat(m3.f)', '112');
debug("");
debug("Test multiply with missing argument");
m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = m.multiply();
shouldBe('m2', 'null');
debug("");
debug("Test immutability of multiply");
shouldBe('parseFloat(m.a)', '1');
shouldBe('parseFloat(m.b)', '2');
shouldBe('parseFloat(m.c)', '3');
shouldBe('parseFloat(m.d)', '4');
shouldBe('parseFloat(m.e)', '5');
shouldBe('parseFloat(m.f)', '6');
debug("");
debug("Test inverse");
m = new WebKitCSSMatrix("matrix(2, 0, 0, 2, 10, 20)");
m2 = m.inverse();
shouldBe('parseFloat(m2.a)', '0.5');
shouldBe('parseFloat(m2.b)', '0');
shouldBe('parseFloat(m2.c)', '0');
shouldBe('parseFloat(m2.d)', '0.5');
shouldBe('parseFloat(m2.e)', '-5');
shouldBe('parseFloat(m2.f)', '-10');
debug("");
debug("Test immutability of inverse");
shouldBe('parseFloat(m.a)', '2');
shouldBe('parseFloat(m.b)', '0');
shouldBe('parseFloat(m.c)', '0');
shouldBe('parseFloat(m.d)', '2');
shouldBe('parseFloat(m.e)', '10');
shouldBe('parseFloat(m.f)', '20');
debug("");
debug("Test throwing exception from inverse");
m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible
shouldThrow('m.inverse()');
debug("");
debug("Test translate");
debug("Test attributes on translate() and accumulation");
m = new WebKitCSSMatrix();
m2 = m.translate(10, 20);
var m2 = m.translate(50,0);
m2 = m2.translate(50,50);
shouldBe('m2.a', '1');
shouldBe('m2.b', '0');
shouldBe('m2.c', '0');
shouldBe('m2.d', '1');
shouldBe('m2.e', '10');
shouldBe('m2.f', '20');
shouldBe('m2.e', '100');
shouldBe('m2.f', '50');
debug("");
debug("Test immutability of translate");
......@@ -175,24 +123,42 @@ shouldBe('parseFloat(m.e)', '0');
shouldBe('parseFloat(m.f)', '0');
debug("");
debug("Test scale");
m = new WebKitCSSMatrix();
m2 = m.scale(10, 20);
shouldBe('m2.a', '10');
shouldBe('m2.b', '0');
shouldBe('m2.c', '0');
shouldBe('m2.d', '20');
shouldBe('m2.e', '0');
shouldBe('m2.f', '0');
debug("Test attributes on scale()");
var m3 = m2.scale(5);
shouldBe('m3.a', '5');
shouldBe('m3.b', '0');
shouldBe('m3.c', '0');
shouldBe('m3.d', '5');
shouldBe('m3.e', '100');
shouldBe('m3.f', '50');
debug("");
debug("Test immutability of scale");
shouldBe('parseFloat(m.a)', '1');
shouldBe('parseFloat(m.b)', '0');
shouldBe('parseFloat(m.c)', '0');
shouldBe('parseFloat(m.d)', '1');
shouldBe('parseFloat(m.e)', '0');
shouldBe('parseFloat(m.f)', '0');
debug("Test immutability of scale()");
shouldBe('parseFloat(m2.a)', '1');
shouldBe('parseFloat(m2.b)', '0');
shouldBe('parseFloat(m2.c)', '0');
shouldBe('parseFloat(m2.d)', '1');
shouldBe('parseFloat(m2.e)', '100');
shouldBe('parseFloat(m2.f)', '50');
debug("");
debug("Test attributes on non-uniform scale()");
var m4 = m3.scale(2,1);
shouldBe('m4.a', '10');
shouldBe('m4.b', '0');
shouldBe('m4.c', '0');
shouldBe('m4.d', '5');
shouldBe('m4.e', '100');
shouldBe('m4.f', '50');
debug("");
debug("Test immutability of non-uniform scale()");
shouldBe('parseFloat(m3.a)', '5');
shouldBe('parseFloat(m3.b)', '0');
shouldBe('parseFloat(m3.c)', '0');
shouldBe('parseFloat(m3.d)', '5');
shouldBe('parseFloat(m3.e)', '100');
shouldBe('parseFloat(m3.f)', '50');
debug("");
debug("Test rotate");
......@@ -214,6 +180,79 @@ shouldBe('parseFloat(m.d)', '1');
shouldBe('parseFloat(m.e)', '0');
shouldBe('parseFloat(m.f)', '0');
debug("");
debug("Test multiply");
m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = new WebKitCSSMatrix("matrix(7, 8, 9, 10, 11, 12)");
var m3 = m.multiply(m2);
shouldBe('parseFloat(m3.a)', '31');
shouldBe('parseFloat(m3.b)', '46');
shouldBe('parseFloat(m3.c)', '39');
shouldBe('parseFloat(m3.d)', '58');
shouldBe('parseFloat(m3.e)', '52');
shouldBe('parseFloat(m3.f)', '76');
debug("");
debug("Test that multiply works in the right direction");
var tx = new WebKitCSSMatrix();
var sx = new WebKitCSSMatrix();
tx = tx.translate(100,0);
sx = sx.scale(2,1);
m = tx.multiply(sx);
shouldBe('m.a', '2');
shouldBe('m.b', '0');
shouldBe('m.c', '0');
shouldBe('m.d', '1');
shouldBe('m.e', '100');
shouldBe('m.f', '0');
debug("")
debug("Test immutability of multiply");
shouldBe('tx.a', '1');
shouldBe('tx.b', '0');
shouldBe('tx.c', '0');
shouldBe('tx.d', '1');
shouldBe('tx.e', '100');
shouldBe('tx.f', '0');
shouldBe('sx.a', '2');
shouldBe('sx.b', '0');
shouldBe('sx.c', '0');
shouldBe('sx.d', '1');
shouldBe('sx.e', '0');
shouldBe('sx.f', '0');
debug("");
debug("Test multiply with missing argument");
m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = m.multiply();
shouldBe('m2', 'null');
debug("");
debug("Test inverse");
m = new WebKitCSSMatrix("matrix(2, 0, 0, 2, 10, 20)");
m2 = m.inverse();
shouldBe('parseFloat(m2.a)', '0.5');
shouldBe('parseFloat(m2.b)', '0');
shouldBe('parseFloat(m2.c)', '0');
shouldBe('parseFloat(m2.d)', '0.5');
shouldBe('parseFloat(m2.e)', '-5');
shouldBe('parseFloat(m2.f)', '-10');
debug("");
debug("Test immutability of inverse");
shouldBe('parseFloat(m.a)', '2');
shouldBe('parseFloat(m.b)', '0');
shouldBe('parseFloat(m.c)', '0');
shouldBe('parseFloat(m.d)', '2');
shouldBe('parseFloat(m.e)', '10');
shouldBe('parseFloat(m.f)', '20');
debug("");
debug("Test throwing exception from inverse");
m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible
shouldThrow('m.inverse()');
debug("");
successfullyParsed = true;
......
......@@ -109,22 +109,22 @@ PASS m.setMatrixValue("translate3d(10em, 20%, 40)") threw exception Error: SYNTA
PASS m.setMatrixValue("translate3d(10px, 20px, 30px) scale3d()") threw exception Error: SYNTAX_ERR: DOM Exception 12.
Test multiply
PASS parseFloat(m3.m11) is 250
PASS parseFloat(m3.m12) is 260
PASS parseFloat(m3.m13) is 270
PASS parseFloat(m3.m14) is 280
PASS parseFloat(m3.m21) is 618
PASS parseFloat(m3.m22) is 644
PASS parseFloat(m3.m23) is 670
PASS parseFloat(m3.m24) is 696
PASS parseFloat(m3.m31) is 986
PASS parseFloat(m3.m32) is 1028
PASS parseFloat(m3.m33) is 1070
PASS parseFloat(m3.m34) is 1112
PASS parseFloat(m3.m41) is 1354
PASS parseFloat(m3.m42) is 1412
PASS parseFloat(m3.m43) is 1470
PASS parseFloat(m3.m44) is 1528
PASS parseFloat(m3.m11) is 538
PASS parseFloat(m3.m12) is 612
PASS parseFloat(m3.m13) is 686
PASS parseFloat(m3.m14) is 760
PASS parseFloat(m3.m21) is 650
PASS parseFloat(m3.m22) is 740
PASS parseFloat(m3.m23) is 830
PASS parseFloat(m3.m24) is 920
PASS parseFloat(m3.m31) is 762
PASS parseFloat(m3.m32) is 868
PASS parseFloat(m3.m33) is 974
PASS parseFloat(m3.m34) is 1080
PASS parseFloat(m3.m41) is 874
PASS parseFloat(m3.m42) is 996
PASS parseFloat(m3.m43) is 1118
PASS parseFloat(m3.m44) is 1240
Test immutability of multiply
PASS parseFloat(m.m11) is 1
......@@ -144,6 +144,42 @@ PASS parseFloat(m.m42) is 14
PASS parseFloat(m.m43) is 15
PASS parseFloat(m.m44) is 16
Test multiply in an affine matrix
PASS parseFloat(m3.m11) is 31
PASS parseFloat(m3.m12) is 46
PASS parseFloat(m3.m13) is 0
PASS parseFloat(m3.m14) is 0
PASS parseFloat(m3.m21) is 39
PASS parseFloat(m3.m22) is 58
PASS parseFloat(m3.m23) is 0
PASS parseFloat(m3.m24) is 0
PASS parseFloat(m3.m31) is 0
PASS parseFloat(m3.m32) is 0
PASS parseFloat(m3.m33) is 1
PASS parseFloat(m3.m34) is 0
PASS parseFloat(m3.m41) is 52
PASS parseFloat(m3.m42) is 76
PASS parseFloat(m3.m43) is 0
PASS parseFloat(m3.m44) is 1
Test that multiply works in the right direction
PASS m.m11 is 2
PASS m.m12 is 0
PASS m.m13 is 0
PASS m.m14 is 0
PASS m.m21 is 0
PASS m.m22 is 1
PASS m.m23 is 0
PASS m.m24 is 0
PASS m.m31 is 0
PASS m.m32 is 0
PASS m.m33 is 1
PASS m.m34 is 0
PASS m.m41 is 100
PASS m.m42 is 0