lamath
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

Logo LAMATH

Build Status Version

Linear Algebra Math Library for Javascript/Typescript

LAMATH is a basic linear algebra library designed to be used with WebGL and Typescript. The library depends on neither of them, so it can be used in any JS/TS project that needs vector math.

Features include:

  • 2D, 3D, and 4D vectors.
  • Matrices of any dimensions n×m. Square matrices, 2×2, 3×3, and 4×4 matrices have their own subtypes.
  • Quaternions.

Performance, simplicity, and generality are the main design goals of the library. Vectors and matrices are defined simply as arrays of numbers, no wrapper objects are used. This minimizes the number of allocations and alleviates GC pressure. If required, it is possible also to reuse the vector/matrix arrays by explicitly specifying the result of the operations.

Package Sidebar

Install

npm i lamath

Weekly Downloads

0

Version

3.0.3

License

MPL-2.0

Unpacked Size

60.6 kB

Total Files

18

Last publish

Collaborators

  • johtela