glsl-determinant

1.0.0 • Public • Published

glsl-determinant

Computes the determinant of a matrix in glsl

Example

#pragma glslify: det require(glsl-determinant) 
 
void main() {
  mat3 m = mat3(123,
                456,
                789);
 
  float d = det(m);
 
  //d is the determinant of m (0 in this case) 
}

Usage

Install with npm:

npm install glsl-determinant

Then use with glslify.

API

#pragma glslify: determinant require(glsl-determinant) 

float d = determinant(float|mat2|mat3|mat4 m)

Computes the determinant of a matrix

  • m is a matrix, either float, mat2, mat3 or mat4

Returns The determinant of m

License

(c) 2014 Mikola Lysenko. MIT License

/glsl-determinant/

    Package Sidebar

    Install

    npm i glsl-determinant

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • dy
    • archmoj
    • hughsk
    • mikolalysenko
    • substack
    • mattdesl
    • chrisdickinson
    • yoshuawuyts
    • mikkoh
    • rezaali
    • tatumcreative
    • wwwtyro
    • thibauts
    • bpostlethwaite
    • dfcreative
    • erkaman
    • gre
    • rreusser
    • vorg