Lineal is a linear algebra toolkit, for easily and efficiently working with
vectors and matrices. It noninvasively extends the prototype of certain arrays
to give you just that bit more ease of use than its sister package
has to offer, while having only a small and acceptable performance overhead.
npm i lineal
Lineal has a very similar API to
gl-matrix, so check out their
documentation for more information. In general,
lineal provides static methods that return a brand-new vector or matrix and
that work on any vector-like structure (i.e. not necessarily a
and a set of member methods that either mutate the given lineal vector or
matrix, or return some kind of computed value. This all sounds more complex
than it really is, so let's check out some examples.
v1.add// v1 is now equal to [3, 6]v2.length // returns 6.7082039325
That's it! Documentation is coming soon; for now you can just read the source code, which is not difficult to read. If you found any bugs, please report them in the issue tracker so they can be fixed. Have fun programming!