@infra7/mat3
v1.0.8
Published
3x3 Matrix Class
Downloads
7
Readme
@infra7/mat3
3x3 Matrix Class
Installation
$ npm i -S @infra7/mat3
Examples
import { Mat3 } from 'mat3';
const mat = Mat3.Multiply([
Mat3.FromScaling([2, 1], [100, 50]),
Mat3.FromRotation(Math.PI / 2, [100, 50]),
]);
mat.mul(Mat3.FromTranslation([-100, 100]));
mat.mulLeft(Mat3.FromTranslation([100, -100]));
mat.transpose();
mat.invert();
console.log(mat.data);