smat2i.md 1.9 KB


id: smat2i title: SMat2I

sidebar_label: SMat2I

An Int backed 2x2 Matrix.

Constructors

Method New(a:Int, b:Int, c:Int, d:Int)

Creates a new SMat2I from the supplied arguments.


Operators

Method Operator+:SMat2I(z:SMat2I)

Adds z to the matrix, returning a new matrix.


Method Operator-:SMat2I(z:SMat2I)

Subtracts z from the matrix, returning a new matrix.


Method Operator*:SMat2I(z:SMat2I)

Multiplies the matrix by z, the dot product, returning a new matrix.


Methods

Method Apply:SVec2I(v:SVec2I)

Applies the matrix to the vector v, returning a new vector.


Method Adjoint:SMat2I()

Returns the transposition of the cofactor matrix.


Method CompMul:SMat2I(z:SMat2I)

Multiplies the matrix by z by its components, return a new matrix.


Method Determinant:Int()

Returns the determinant of the matrix.


Method Invert:SMat2I()

Returns the inverse of the matrix.


Method Rotate:SMat2I(angle:Double)

Rotates the matrix by angle degrees, returning the rotated matrix.


Method Scale:SMat2I(s:SVec2I)

Returns the scale of this matrix.


Method Scale:SMat2I(s:SVec2D)

Returns the scale of this matrix.


Method Scale:SMat2I(s:SVec2F)

Returns the scale of this matrix.


Method Transpose:SMat2I()

Returns the transpose of this matrix.


Method ToString:String() Override

Returns a String representation of the matrix.


Functions

Function Identity:SMat2I()

Returns the identity matrix.


Function Rotation:SMat2I(angle:Double)

Creates a rotated matrix of angle degrees.


Function Scaling:SMat2I(s:SVec2I)

Creates a scaled matrix of the scale s.