Skip to content

Commit 1ab1c0a

Browse files
authored
Merge pull request #3 from cyy641278529/master
Add a test case for mat23.fromRTS
2 parents e858be4 + 01bcfa6 commit 1ab1c0a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/mat23.spec.js

+17
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,23 @@ tap.test('mat23', t => {
233233
t.end();
234234
});
235235

236+
t.test('fromRTS', t => {
237+
let vecA = vec2.create();
238+
t.beforeEach(done => {
239+
vec2.set(vecA, 2, 3);
240+
done();
241+
});
242+
243+
t.test('with a separate output matrix', t => {
244+
result = mat23.fromRTS(out, Math.PI * 0.5, vecA, vecA);
245+
t.equal_m23(out, [0, 2, -3, 0, 2, 3]);
246+
t.equal(result, out);
247+
t.end();
248+
});
249+
250+
t.end();
251+
});
252+
236253
t.test('str', t => {
237254
result = mat23.str(matA);
238255

0 commit comments

Comments
 (0)