matrix
An vector matrix.
Signatures
- matrix( vector row1, vector row2 )
- matrix( vector row1, vector row2, vector row3 )
- matrix( 4vector row1, 4vector row2, 4vector row3 )
Details
The basic vector transformation matrix type.
The first constructor may be used to define 2x2 matrices. It implicitly adds an additional row and column containing zero values. The second constructor creates a 3x3 matrix. The third constructor can be used to create a 3x4 affine transformation (including translations).
A similar short-hand notation using double brackets '<[' and ']>' as for vectors exists (see example).
Example
matrix m1 = <[<[ 0.5, 0.0, -0.5 ]>,
<[ 0.0, 1.0, 0.0 ]>,
<[ 2.0, 0.0, 0.5 ]>]>
echo( m1 )
Output
<[<[0.5,0,-0.5]>,<[0,1,0]>,<[2,0,0.5]>]>
Casts To
Parameters
- row1
-
A vector defining the first row of the matrix.
- row2
-
A vector defining the second row of the matrix.
- row3
-
A vector defining the third row of the matrix.