Mat2D

Description

struct Tinman.Core.Math.Vectors.Mat2D

A 2x2 matrix with 64-bit floating-point precision.

/            \
|  M11  M12  |
|  M21  M22  |
\            /

Public / Constants

Identity


public static readonly attribute Identity → (Mat2D)

The identity matrix.

Zero


public static readonly attribute Zero → (Mat2D)

The zero matrix.

Public / Constructors

From​Columns


[Pure]
public static method FromColumns → (2)

col1 in : Vec2D

The first column vector.

col2 in : Vec2D

The second column vector.

returns → Mat2D

The matrix.

Creates a new instance of Mat2D.

From​Rows


[Pure]
public static method FromRows → (2)

row1 in : Vec2D

The first row vector.

row2 in : Vec2D

The second row vector.

returns → Mat2D

The matrix.

Creates a new instance of Mat2D.

Mat2​D


public constructor Mat2D → (4)

m11 in : float64

Matrix component in first row, first column.

m12 in : float64

Matrix component in first row, second column.

m21 in : float64

Matrix component in second row, first column.

m22 in : float64

Matrix component in second row, second column.

Creates a new instance of Mat2D.

Rotate


[Pure]
public static method Rotate → (1)

angle in : float64

The rotation angle, in radians.

returns → Mat2D

The resulting matrix.

Returns a rotation matrix (counter-clockwise for right-handed coordinate system when viewed from above).

Scale

3 overloads


[Pure]
public static method Scale1 → (1)

in : float64

The scale factor.

returns → Mat2D

The resulting matrix.

Returns a scaling matrix.


[Pure]
public static method Scale2 → (1)

in : Vec2D

The scale factors.

returns → Mat2D

The resulting matrix.

Returns a scaling matrix.


[Pure]
public static method Scale3 → (2)

fx in : float64

The scale factor along the X-axis.

fy in : float64

The scale factor along the Y-axis.

returns → Mat2D

The resulting matrix.

Returns a scaling matrix.

Public / Attributes

M11


public readonly attribute M11 → (float64)

Matrix component in first row, first column.

M12


public readonly attribute M12 → (float64)

Matrix component in first row, second column.

M21


public readonly attribute M21 → (float64)

Matrix component in second row, first column.

M22


public readonly attribute M22 → (float64)

Matrix component in second row, second column.

Serialization

Serializer


public static readonly attribute Serializer → (ITypeSerializer<Mat2D>)

The serialization helper object for values of Mat2D.