Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gl-matrix-invert

mikolalysenko30.7kMIT1.0.0

Inverts a matrix in gl-matrix format of any dimension

gl-matrix, invert, inversion, inverse, linear, algebra

readme

gl-matrix-invert

Dimension independent matrix inverse

Example

var invert = require('gl-matrix-invert')


console.log(invert(new Array(9), [1, 0, 0,
                                  0, 1, 0,
                                  -1, 10, 1]))

API

require('gl-matrix-invert')(dest, src)

Computes the inverse of an array matrix in column-major order (as is the convention in WebGL/gl-matrix).

  • src is the input matrix
  • dest is an array which receives the result of the matrix inverse

Returns dst

Notes Currently only works with matrices up to 4x4

Credits

(c) 2014 Mikola Lysenko. MIT License