Mat22_i (struct)¶
The Mat22_i represents a 2 by 2 matrix. It uses Vec2_i types for each of the 2 rows.
/*
** Example: Construct Mat22_i
*/
// create a matrix 2x2
Vec2_i v0(1.0, 0.0);
Vec2_i v1(0.0, 1.0);
Mat22_i mat(v0, v1);
Methods¶
Mat22_i ( in Mat22_i other ) | |
Mat22_i ( in SInt32 _00, in SInt32 _01, in SInt32 _10, in SInt32 _11 ) | |
Mat22_i ( in Vec2_i row0, in Vec2_i row1 ) | |
Mat22_i () | |
Mat22_i | add ? ( in Mat22_i other ) |
Mat22_i | adjoint ? () |
Boolean | almostEqual ? ( in Mat22_i other ) |
Boolean | almostEqual ? ( in Mat22_i other, in SInt32 precision ) |
Mat22_i | clone ? () |
SInt32 | determinant ? () |
Mat22_i | divideSInt32 ? ( in SInt32 other ) |
Boolean | equal ? ( in Mat22_i other ) |
get ? ( io Float32 v<> ) | |
get ? ( io Float32 v<>, in UInt32 o ) | |
get ? ( io Float32 v[] ) | |
get ? ( io Float32 v[], in UInt32 o ) | |
get ? ( io Float64 v<> ) | |
get ? ( io Float64 v<>, in UInt32 o ) | |
get ? ( io Float64 v[] ) | |
get ? ( io Float64 v[], in UInt32 o ) | |
UInt32 | hash ? () |
Mat22_i | inverse ? () |
Mat22_i | multiply ? ( in Mat22_i other ) |
Mat22_i | multiplySInt32 ? ( in SInt32 other ) |
Vec2_i | multiplyVector ? ( in Vec2_i other ) |
set ! ( in Float32 v<> ) | |
set ! ( in Float32 v<>, in UInt32 o ) | |
set ! ( in Float64 v<> ) | |
set ! ( in Float64 v<>, in UInt32 o ) | |
set ! ( in SInt32 _00, in SInt32 _01, in SInt32 _10, in SInt32 _11 ) | |
setColumns ! ( in Vec2_i col0, in Vec2_i col1 ) | |
setDiagonal ! ( in SInt32 v ) | |
setDiagonal ! ( in Vec2_i v ) | |
setIdentity ! () | |
setNull ! () | |
setRows ! ( in Vec2_i row0, in Vec2_i row1 ) | |
Mat22_i | subtract ? ( in Mat22_i other ) |
Mat22_i | transpose ? () |
Methods in detail¶
copy constructor
Mat22_i ( in SInt32 _00, in SInt32 _01, in SInt32 _10, in SInt32 _11 )
Constructor from scalars
Mat22_i ( in Vec2_i row0, in Vec2_i row1 )
Constructor from vectors
Mat22_i ()
Mat22_i Mat22_i.add? ( in Mat22_i other )
Overload method for the add operator
Returns the adjoint matrix of this matrix
Boolean Mat22_i.almostEqual? ( in Mat22_i other )
Returns true if this matrix is almost the same as another one (using a default precision)
Boolean Mat22_i.almostEqual? ( in Mat22_i other, in SInt32 precision )
Returns true if this matrix is almost the same as another one (given a precision)
clone method
SInt32 Mat22_i.determinant? ()
Returns the determinant of this matrix
Mat22_i Mat22_i.divideSInt32? ( in SInt32 other )
Returns the division of this matrix and a scalar
Boolean Mat22_i.equal? ( in Mat22_i other )
Returns true if this matrix is the same as another one
Mat22_i.get? ( io Float32 v<> )
Getter as external float32 array
Mat22_i.get? ( io Float32 v<>, in UInt32 o )
Getter as external float32 array and an offset
Mat22_i.get? ( io Float32 v[] )
Getter as float32 array
Mat22_i.get? ( io Float32 v[], in UInt32 o )
Getter as float32 array and an offset
Mat22_i.get? ( io Float64 v<> )
Getter as external float64 array
Mat22_i.get? ( io Float64 v<>, in UInt32 o )
Getter as external float64 array and an offset
Mat22_i.get? ( io Float64 v[] )
Getter as float64 array
Mat22_i.get? ( io Float64 v[], in UInt32 o )
Getter as float64 array and an offset
Hash for this value
Returns the inverse matrix of this matrix
Mat22_i Mat22_i.multiply? ( in Mat22_i other )
Overload method for the multiply operator
Mat22_i Mat22_i.multiplySInt32? ( in SInt32 other )
// overload method for the divide operator inline Mat22_i Mat22_i.divide(Mat22_i other) { return this / other; } Returns the product of this matrix and a scalar
Vec2_i Mat22_i.multiplyVector? ( in Vec2_i other )
Returns the product of this matrix and a vector
Mat22_i.set! ( in Float32 v<> )
Setter from (standard/external) float32 array
Mat22_i.set! ( in Float32 v<>, in UInt32 o )
Setter from (standard/external) float32 array and an offset
Mat22_i.set! ( in Float64 v<> )
Setter from (standard/external) float64 array
Mat22_i.set! ( in Float64 v<>, in UInt32 o )
Setter from (standard/external) float64 array and an offset
Mat22_i.set! ( in SInt32 _00, in SInt32 _01, in SInt32 _10, in SInt32 _11 )
Sets each component with a single scalar value.
Mat22_i.setColumns! ( in Vec2_i col0, in Vec2_i col1 )
Setter from vectors, column-wise
Mat22_i.setDiagonal! ( in SInt32 v )
setting the diagonal components of this matrix to a scalar
Mat22_i.setDiagonal! ( in Vec2_i v )
setting the diagonal components of this matrix to the components of a vector
Mat22_i.setIdentity! ()
setting this matrix to the identity matrix
Mat22_i.setNull! ()
setting all components of the matrix to 0.0
Mat22_i.setRows! ( in Vec2_i row0, in Vec2_i row1 )
Setter from vectors, row-wise
Mat22_i Mat22_i.subtract? ( in Mat22_i other )
Overload method for the subtract operator
Returns the transposed matrix of this matrix