glsl-determinant
Computes the determinant of a matrix in glsl
Last updated 6 years ago by mikolalysenko .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glsl-determinant 
SYNC missed versions from official npm registry.

glsl-determinant

Computes the determinant of a matrix in glsl

Example

#pragma glslify: det = require(glsl-determinant)

void main() {
  mat3 m = mat3(1, 2, 3,
                4, 5, 6,
                7, 8, 9);

  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

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |