MCPcopy Create free account
hub / github.com/defold/defold / Inverse

Function Inverse

engine/script/src/script_vmath.cpp:1756–1762  ·  view source on GitHub ↗

calculates the inverse matrix. * The resulting matrix is the inverse of the supplied matrix. * * [icon:attention] For ortho-normal matrices, e.g. regular object transformation, * use `vmath.ortho_inv()` instead. * The specialized inverse for ortho-normalized matrices is much faster * than the general inverse. * * @name vmath.inv * @param m1 [type:matrix

Source from the content-addressed store, hash-verified

1754 * ```
1755 */
1756 static int Inverse(lua_State* L)
1757 {
1758 const Matrix4* m = CheckMatrix4(L, 1);
1759 Matrix4 mi = dmVMath::Inverse(*m);
1760 PushMatrix4(L, mi);
1761 return 1;
1762 }
1763
1764 /*# calculates the inverse of an ortho-normal matrix.
1765 * The resulting matrix is the inverse of the supplied matrix.

Callers 5

UpdatePoseTransformsFunction · 0.50
GenerateVertexDataFunction · 0.50
TEST_FFunction · 0.50
SetProgramConstantFunction · 0.50
CameraScreenToWorldFunction · 0.50

Calls 2

CheckMatrix4Function · 0.85
PushMatrix4Function · 0.85

Tested by 1

TEST_FFunction · 0.40