Method Math.Matrix()->create()


Method create

Math.Matrix Math.Matrix(array(array(int|float)) matrix_2d)
Math.Matrix Math.Matrix(array(int|float) matrix_1d)

Description

Initializes the matrix as a 1D or 2D matrix, e.g. Math.Matrix( ({({1,2}),({3,4})}) ).


Method create

Math.Matrix Math.Matrix(int n, int m)
Math.Matrix Math.Matrix(int n, int m, string type)
Math.Matrix Math.Matrix(int n, int m, float|int init)

Description

Initializes the matrix as to be a n*m matrix with init in every value. If no third argument is given, or the third argument is "identity", the matrix will be initialized with all zeroes except for the diagonal which will be 1.


Method create

Math.Matrix Math.Matrix(string type, int size)

Description

When type is "identity" the matrix is initializes as a square identity matrix.


Method create

Math.Matrix Math.Matrix(string type, int size, float rads, Matrix axis)
Math.Matrix Math.Matrix(string type, int size, float rads, float x, float y, float z)

Description

When type is "rotate" the matrix is initialized as a rotation matrix.