npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mecks

v0.1.3

Published

Minimum Linear Algebra Library

Downloads

141

Readme

mecks

Build Status

Minimum Linear Algebra Library

Usage

npm install mecks

mecks was built immutable on purpose and relies on the vecks vector library.

Contributing

While developing make sure you use gulp watch to ease the process of testing your contribution.

Documentation


Matrix2

Members:

  • nullMatrixData
  • identityMatrixData

Matrix2.Matrix2()

A 2x2 matrix

Matrix2.construct()

Construct the matrix using a linearized array

Matrix2.at(i, j)

Access an element of the matrix.

Parameters

i: number, row index

j: number, column index

Matrix2.data()

Get all elements of the matrix.

Returns: Array.<number>, linearized data of the matrix

Matrix2.det()

Calculate the determinant of the matrix.

Returns: float

Matrix2.inv()

Invert the Matrix.

Returns: Matrix2

Matrix2.mulV(v)

Multiply a given vector with this matrix.

Parameters

v: , Multiply a given vector with this matrix.

Returns: Vec2

Matrix2.add(rhs)

Add a given righthandside Matrix2 to this Matrix.

Parameters

rhs: , Add a given righthandside Matrix2 to this Matrix.

Returns: Matrix2

Matrix2.sub(rhs)

Subtract a given righthandside Matrix2 to this Matrix.

Parameters

rhs: , Subtract a given righthandside Matrix2 to this Matrix.

Returns: Matrix2

Matrix2.mul(rhs)

Multiply the Matrix by a given righthandside Matrix2.

Parameters

rhs: , Multiply the Matrix by a given righthandside Matrix2.

Returns: Matrix2

Matrix2.addS(s)

Add a Scalar value to the Matrix.

Parameters

s: , Add a Scalar value to the Matrix.

Returns: Matrix2

Matrix2.subS(s)

Subtract a Scalar value from the Matrix.

Parameters

s: , Subtract a Scalar value from the Matrix.

Returns: Matrix2

Matrix2.mulS(s)

Multiply the Matrix by a Scalar Value.

Parameters

s: , Multiply the Matrix by a Scalar Value.

Returns: Matrix2

Matrix2.divS(s)

Divide the Matrix by a Scalar Value.

Parameters

s: , Divide the Matrix by a Scalar Value.

Returns: Matrix2

Matrix2.identity()

Returns a new Identity Matrix.

Returns: Matrix2

Matrix2.nullMatrix()

Returns a new Null Matrix.

Returns: Matrix2


Matrix3

Members:

  • nullMatrixData
  • identityMatrixData

Matrix3.Matrix3()

A 3x3 matrix

Matrix3.construct()

Construct the matrix using a linearized array

Matrix3.at(i, j)

Access an element of the matrix.

Parameters

i: number, row index

j: number, column index

Matrix3.data()

Get all elements of the matrix.

Returns: Array.<number>, linearized data of the matrix

Matrix3.det()

Calculate the determinant of the matrix.

Returns: float

Matrix3.inv()

Invert the Matrix.

Returns: Matrix3

Matrix3.add(rhs)

Add a given righthandside Matrix4 to this Matrix.

Parameters

rhs: , Add a given righthandside Matrix4 to this Matrix.

Returns: Matrix3

Matrix3.sub(rhs)

Subtract a given righthandside Matrix4 to this Matrix.

Parameters

rhs: , Subtract a given righthandside Matrix4 to this Matrix.

Returns: Matrix3

Matrix3.mul(rhs)

Multiply the Matrix by a given righthandside Matrix.

Parameters

rhs: , Multiply the Matrix by a given righthandside Matrix.

Returns: Matrix3

Matrix3.mulV(rhs)

Multiply a given vector

Parameters

rhs: , Multiply a given vector

Returns: Vec3

Matrix3.addS(s)

Add a Scalar value to the Matrix.

Parameters

s: , Add a Scalar value to the Matrix.

Returns: Matrix4

Matrix3.subS(s)

Subtract a Scalar value from the Matrix.

Parameters

s: , Subtract a Scalar value from the Matrix.

Returns: Matrix4

Matrix3.mulS(s)

Multiply the Matrix by a Scalar Value.

Parameters

s: , Multiply the Matrix by a Scalar Value.

Returns: Matrix4

Matrix3.divS(s)

Divide the Matrix by a Scalar Value.

Parameters

s: , Divide the Matrix by a Scalar Value.

Returns: Matrix4

Matrix3.identity()

Returns a new Identity Matrix.

Returns: Matrix3

Matrix3.nullMatrix()

Returns a new Null Matrix.

Returns: Matrix3


Matrix4

Members:

  • nullMatrixData
  • identityMatrixData

Matrix4.Matrix4()

A 4x4 matrix

Matrix4.at(i, j)

Access an element of the matrix.

Parameters

i: number, row index

j: number, column index

Matrix4.data()

Get all elements of the matrix.

Returns: Array.<number>, linearized data of the matrix

Matrix4.det()

Calculate the determinant of the matrix.

Returns: float

Matrix4.inv()

Invert the Matrix.

Returns: Matrix2

Matrix4.mulV(rhs)

Multiply a given vector with this matrix.

Parameters

rhs: , Multiply a given vector with this matrix.

Returns: Vec3

Matrix4.add(rhs)

Add a given righthandside Matrix4 to this Matrix.

Parameters

rhs: , Add a given righthandside Matrix4 to this Matrix.

Returns: Matrix4

Matrix4.sub(rhs)

Subtract a given righthandside Matrix4 to this Matrix.

Parameters

rhs: , Subtract a given righthandside Matrix4 to this Matrix.

Returns: Matrix4

Matrix4.mul(rhs)

Multiply the Matrix by a given righthandside Matrix4.

Parameters

rhs: , Multiply the Matrix by a given righthandside Matrix4.

Returns: Matrix4

Matrix4.addS(s)

Add a Scalar value to the Matrix.

Parameters

s: , Add a Scalar value to the Matrix.

Returns: Matrix4

Matrix4.subS(s)

Subtract a Scalar value from the Matrix.

Parameters

s: , Subtract a Scalar value from the Matrix.

Returns: Matrix4

Matrix4.mulS(s)

Multiply the Matrix by a Scalar Value.

Parameters

s: , Multiply the Matrix by a Scalar Value.

Returns: Matrix4

Matrix4.divS(s)

Divide the Matrix by a Scalar Value.

Parameters

s: , Divide the Matrix by a Scalar Value.

Returns: Matrix4

Matrix4.identity()

Returns a new Identity Matrix.

Returns: Matrix4

Matrix4.nullMatrix()

Returns a new Null Matrix.

Returns: Matrix4


Plane


Plane.Plane()

A Plane representation

Plane.project()

Project a point onto the plane.