0.6.1 • Published 4 years ago

enva2712-math v0.6.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Math Stuff

This is a monorepo for math related code that I write.

Matrix math

import { Matrix } from "enva2712-math";

// Construct matrices from arrays
const myMatrix = Matrix.fromArray([
    [1, 2],
    [3, 4],
]);

// strings
const myOtherMatrix = Matrix.fromString(`4, 3\n2, 1`);

// or tagged templates
const identityMatrix = Matrix.tag`
    1, 0
    0, 1
`;

// add, subtract, and multiply by scalar values
myMatrix.mul(2).add(8).sub(9); // => Matrix { ... }

// or other matricies
myMatrix
    .add(myOtherMatrix)
    .mul(identityMatrix)
    // And check for equality
    .equals(myMatrix); // => false
0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago