Mat22 (struct)

The Mat22 represents a 2 by 2 matrix. It uses Vec2 types for each of the 2 rows.

/*
** Example: Construct Mat22
*/

// create a matrix 2x2
Vec2 v0(1.0, 0.0);
Vec2 v1(0.0, 1.0);
Mat22 mat(v0, v1);

Mat22 Mat22 Mat22

Members

Vec2 row0  
Vec2 row1  

Methods

  Mat22 ( in Mat22 other )
  Mat22 ( in Scalar _00, in Scalar _01, in Scalar _10, in Scalar _11 )
  Mat22 ( in Vec2 row0, in Vec2 row1 )
  Mat22 ()
Mat22 add ? ( in Mat22 other )
Mat22 adjoint ? ()
Boolean almostEqual ? ( in Mat22 other )
Boolean almostEqual ? ( in Mat22 other, in Scalar precision )
Mat22 clone ? ()
Scalar determinant ? ()
Mat22 divideScalar ? ( in Scalar other )
Boolean equal ? ( in Mat22 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 inverse ? ()
Mat22 multiply ? ( in Mat22 other )
Mat22 multiplyScalar ? ( in Scalar other )
Vec2 multiplyVector ? ( in Vec2 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 Scalar _00, in Scalar _01, in Scalar _10, in Scalar _11 )
  setColumns ! ( in Vec2 col0, in Vec2 col1 )
  setDiagonal ! ( in Scalar v )
  setDiagonal ! ( in Vec2 v )
  setIdentity ! ()
  setNull ! ()
  setRows ! ( in Vec2 row0, in Vec2 row1 )
Mat22 subtract ? ( in Mat22 other )
Mat22 transpose ? ()

Operators

Mat22 = ( Param other )

Methods in detail

Mat22 ( in Mat22 other )

copy constructor


Mat22 ( in Scalar _00, in Scalar _01, in Scalar _10, in Scalar _11 )

Constructor from scalars


Mat22 ( in Vec2 row0, in Vec2 row1 )

Constructor from vectors


Mat22 ()


Mat22 Mat22.add? ( in Mat22 other )

Overload method for the add operator


Mat22 Mat22.adjoint? ()

Returns the adjoint matrix of this matrix


Boolean Mat22.almostEqual? ( in Mat22 other )

Returns true if this matrix is almost the same as another one (using a default precision)


Boolean Mat22.almostEqual? ( in Mat22 other, in Scalar precision )

Returns true if this matrix is almost the same as another one (given a precision)


Mat22 Mat22.clone? ()

clone method


Scalar Mat22.determinant? ()

Returns the determinant of this matrix


Mat22 Mat22.divideScalar? ( in Scalar other )

Returns the division of this matrix and a scalar


Boolean Mat22.equal? ( in Mat22 other )

Returns true if this matrix is the same as another one


Mat22.get? ( io Float32 v<> )

Getter as external float32 array


Mat22.get? ( io Float32 v<>, in UInt32 o )

Getter as external float32 array and an offset


Mat22.get? ( io Float32 v[] )

Getter as float32 array


Mat22.get? ( io Float32 v[], in UInt32 o )

Getter as float32 array and an offset


Mat22.get? ( io Float64 v<> )

Getter as external float64 array


Mat22.get? ( io Float64 v<>, in UInt32 o )

Getter as external float64 array and an offset


Mat22.get? ( io Float64 v[] )

Getter as float64 array


Mat22.get? ( io Float64 v[], in UInt32 o )

Getter as float64 array and an offset


UInt32 Mat22.hash? ()

Hash for this value


Mat22 Mat22.inverse? ()

Returns the inverse matrix of this matrix


Mat22 Mat22.multiply? ( in Mat22 other )

Overload method for the multiply operator


Mat22 Mat22.multiplyScalar? ( in Scalar other )

// overload method for the divide operator inline Mat22 Mat22.divide(Mat22 other) { return this / other; } Returns the product of this matrix and a scalar


Vec2 Mat22.multiplyVector? ( in Vec2 other )

Returns the product of this matrix and a vector


Mat22.set! ( in Float32 v<> )

Setter from (standard/external) float32 array


Mat22.set! ( in Float32 v<>, in UInt32 o )

Setter from (standard/external) float32 array and an offset


Mat22.set! ( in Float64 v<> )

Setter from (standard/external) float64 array


Mat22.set! ( in Float64 v<>, in UInt32 o )

Setter from (standard/external) float64 array and an offset


Mat22.set! ( in Scalar _00, in Scalar _01, in Scalar _10, in Scalar _11 )

Sets each component with a single scalar value.


Mat22.setColumns! ( in Vec2 col0, in Vec2 col1 )

Setter from vectors, column-wise


Mat22.setDiagonal! ( in Scalar v )

setting the diagonal components of this matrix to a scalar


Mat22.setDiagonal! ( in Vec2 v )

setting the diagonal components of this matrix to the components of a vector


Mat22.setIdentity! ()

setting this matrix to the identity matrix


Mat22.setNull! ()

setting all components of the matrix to 0.0


Mat22.setRows! ( in Vec2 row0, in Vec2 row1 )

Setter from vectors, row-wise


Mat22 Mat22.subtract? ( in Mat22 other )

Overload method for the subtract operator


Mat22 Mat22.transpose? ()

Returns the transposed matrix of this matrix

Operators in detail

Mat22 = ( Param other )

Adds another matrix to this one