Skip to content

Commit

Permalink
add unit test for Mat4
Browse files Browse the repository at this point in the history
  • Loading branch information
doxas committed Jan 8, 2021
1 parent 50f98b6 commit 1e015f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __tests__/Mat4.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ describe('static method in Mat4', () => {
const target = [];
expect(Mat4.inverse(source, target) === target).toBeTruthy();
});
test('Mat4.toVecIII', () => {
const source = Mat4.scale(Mat4.identity(), [1.0, 2.0, 3.0]);
const vector = [1, 2, 3];
const target = [1, 4, 9];
expect(Mat4.toVecIII(source, vector)).every(target);
});
test('Mat4.toVecIV', () => {
const source = Mat4.scale(Mat4.identity(), [1.0, 2.0, 3.0]);
const vector = [1, 2, 3, 4];
Expand Down

0 comments on commit 1e015f5

Please sign in to comment.