class nape.geom.MatMN

Available on all platforms

A general MxN dimensional matrix. *

* This object is not often used in Nape :)

Instance Fields

var cols:Int

The number of columns in the matrix.

var rows:Int

The number of rows in the matrix.

var zpp_inner:ZPP_MatMN

@private

function new(rows:Int, cols:Int):Void

Construct a new Matrix. * *

rows

The number of rows in matrix. *

cols

The number of columns in matrix. *

returns

The constructed Matrix. *

function mul(matrix:MatMN):MatMN

Multiple this matrix with another. *

* This operation is only valid if the number of columns * in this matrix, is equal to the number of rows in the input * matrix. *
* The result of the multiplication is returned as a new matrix. * *

matrix

The matrix to multiple with. *

returns

The result of the multiplication *

function setx(row:Int, col:Int, x:Float):Float

Set element at index. * *

row

The row of the matrix to set. *

col

The column of the matrix to set. *

x

The value to set at given (row,col) index. *

returns

The value of matrix at given index after set. (Always equal to the x parameter)

function toString():String

@private

function transpose():MatMN

Transpose matrix, returning a new Matrix. * *

returns

The transposed matrix.

function x(row:Int, col:Int):Float

Access element at index. * *

row

The row of the matrix to access. *

col

the column of the matrix to access. *

returns

The element at given (row,col) index. *