Ninja Library - Matrix Function

njInvertMatrix

Obtains the inverse (reversed rows/columns) of a matrix

FORMAT

void njInvertMatrix(*m)
NJS_MATRIX *m

PARAMETER

 *m  Source matrix 

RETURN

None

DESCRIPTION

Inverts the rows and columns of an arbitrary matrix m. When parameter m is NULL, the current matrix is inverted.

EXAMPLE

The following inverts the current matrix.
NJS_MATRIX stack[10];
NJS_VIEW view;
NJS_VECTOR v;
v.x = 0.5f;
v.y = 1.f;
v.z = 2.f;
njInitMatrix(stack, 10);
njInitView(&view);
njSetView(&view);
njClearMatrix();
njPushMatrix(NULL);
njInvertMatrix(NULL);
njPopMatrix(1);

NOTE

If the arbitrary matrix is given as [M], the result is [M] = [M]-1.

njInvertMatrix
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999