Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
A fast and elegant vector/matrix calculation framework for JavaScript and friends
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 gl-matrix
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 new Vec2()
),
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.
import Vec2 from "lineal/vec2"
const v1 = new Vec2(1, 2)
v1.add([3, 4])
// v1 is now equal to [3, 6]
const v2 = Vec2.add([1, 2], [3, 4]) // returns a brand-new Vec2([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!
FAQs
A fast and elegant vector/matrix calculation framework for JavaScript and friends
The npm package lineal receives a total of 2 weekly downloads. As such, lineal popularity was classified as not popular.
We found that lineal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.