should set0ms ‣
const expected = [2, 3, 4, 5, 22, 33, 44, 55, 222, 333, 444, 555, 2222, 3333, 4444, 5555];
testMat4WithAndWithoutDest((v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, newDst) => {
return mat4.set(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, newDst);
}, expected, 2, 3, 4, 5, 22, 33, 44, 55, 222, 333, 444, 555, 2222, 3333, 4444, 5555);
should set translation0ms ‣
const expected = [
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11,
11, 22, 33, 1,
];
testMat4WithAndWithoutDest((newDst) => {
return mat4.setTranslation(m, [11, 22, 33], newDst);
}, expected);
should set axis0ms ‣
[
[
11, 22, 33, 3,
4, 5, 6, 7,
8, 9, 10, 11,
12, 13, 14, 15,
],
[
0, 1, 2, 3,
11, 22, 33, 7,
8, 9, 10, 11,
12, 13, 14, 15,
],
[
0, 1, 2, 3,
4, 5, 6, 7,
11, 22, 33, 11,
12, 13, 14, 15,
],
].forEach((expected, ndx) => {
testMat4WithAndWithoutDest((newDst) => {
return mat4.setAxis(m, [11, 22, 33], ndx, newDst);
}, expected);
});