Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 01bcfa6

Browse files
committedSep 19, 2017
Add a test case for mat23.fromRTS
Add a test case for mat23.fromRTS
1 parent e858be4 commit 01bcfa6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎test/mat23.spec.js

Lines changed: 17 additions & 0 deletions
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)
Please sign in to comment.