OLD | NEW |
1 function assert_identity_2d_matrix(actual) { | 1 function assert_identity_2d_matrix(actual) { |
2 assert_true(actual instanceof DOMMatrixReadOnly); | 2 assert_true(actual instanceof DOMMatrixReadOnly); |
3 assert_true(actual.is2D, "is2D"); | 3 assert_true(actual.is2D, "is2D"); |
4 assert_true(actual.isIdentity, "isIdentity"); | 4 assert_true(actual.isIdentity, "isIdentity"); |
5 assert_identity_matrix(actual); | 5 assert_identity_matrix(actual); |
6 } | 6 } |
7 | 7 |
8 function assert_identity_3d_matrix(actual) { | 8 function assert_identity_3d_matrix(actual) { |
9 assert_true(actual instanceof DOMMatrixReadOnly); | 9 assert_true(actual instanceof DOMMatrixReadOnly); |
10 assert_false(actual.is2D, "is2D"); | 10 assert_false(actual.is2D, "is2D"); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 function assert_array_almost_equals(actual, expected) { | 57 function assert_array_almost_equals(actual, expected) { |
58 for (var i = 0; i < actual.length; i++) { | 58 for (var i = 0; i < actual.length; i++) { |
59 assert_equals(actual[i].toFixed(10), expected[i].toFixed(10)); | 59 assert_equals(actual[i].toFixed(10), expected[i].toFixed(10)); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 function assert_matrix_almost_equals(actual, expected) { | 63 function assert_matrix_almost_equals(actual, expected) { |
64 assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array())
; | 64 assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array())
; |
65 } | 65 } |
| 66 |
| 67 function assert_point_equals(actual, expected) { |
| 68 assert_equals(actual.x, expected.x, "point equality: x differs"); |
| 69 assert_equals(actual.y, expected.y, "point equality: y differs"); |
| 70 assert_equals(actual.z, expected.z, "point equality: z differs"); |
| 71 assert_equals(actual.w, expected.w, "point equality: w differs"); |
| 72 } |
OLD | NEW |