MCPcopy Index your code
hub / github.com/plotly/plotly.js / determinant

Function determinant

stackgl_modules/index.js:15983–16004  ·  view source on GitHub ↗

* Calculates the determinant of a mat4 * * @param {mat4} a the source matrix * @returns {Number} determinant of a

(a)

Source from the content-addressed store, hash-verified

15981 * @returns {Number} determinant of a
15982 */
15983function determinant(a) {
15984 var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
15985 a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
15986 a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
15987 a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
15988
15989 b00 = a00 * a11 - a01 * a10,
15990 b01 = a00 * a12 - a02 * a10,
15991 b02 = a00 * a13 - a03 * a10,
15992 b03 = a01 * a12 - a02 * a11,
15993 b04 = a01 * a13 - a03 * a11,
15994 b05 = a02 * a13 - a03 * a12,
15995 b06 = a20 * a31 - a21 * a30,
15996 b07 = a20 * a32 - a22 * a30,
15997 b08 = a20 * a33 - a23 * a30,
15998 b09 = a21 * a32 - a22 * a31,
15999 b10 = a21 * a33 - a23 * a31,
16000 b11 = a22 * a33 - a23 * a32;
16001
16002 // Calculate the determinant
16003 return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
16004};
16005
16006/***/ }),
16007

Callers 2

index.jsFile · 0.85
interpolateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…