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