Struct Matrix2X2
- Namespace
- Alis.Core.Aspect.Math.Matrix
- Assembly
- Alis.dll
A 2-by-2 matrix. Stored in column-major order.
public struct Matrix2X2
Inherited Members
Constructors
Matrix2X2(float, float, float, float)
Construct this matrix using scalars.
public Matrix2X2(float a11, float a12, float a21, float a22)
Parameters
Matrix2X2(float)
Construct this matrix using an angle. This matrix becomes an orthonormal rotation matrix.
public Matrix2X2(float angle)
Parameters
angle
float
Properties
Ex
The col
public Vector2 Ex { readonly get; set; }
Property Value
Ey
The col
public Vector2 Ey { readonly get; set; }
Property Value
Inverse
Gets the value of the inverse
public Matrix2X2 Inverse { get; }
Property Value
Methods
GetAngle()
Extract the angle from this matrix (assumed to be a rotation matrix).
public float GetAngle()
Returns
GetInverse()
Compute the inverse of this matrix, such that inv(A) * A = identity.
public Matrix2X2 GetInverse()
Returns
Set(Vector2, Vector2)
Initialize this matrix using columns.
public void Set(Vector2 c1, Vector2 c2)
Parameters
SetIdentity()
Set this to the identity matrix.
public void SetIdentity()
SetZero()
Set this matrix to all zeros.
public void SetZero()
Solve(Vector2)
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
public Vector2 Solve(Vector2 b)
Parameters
b
Vector2
Returns
Operators
operator +(Matrix2X2, Matrix2X2)
public static Matrix2X2 operator +(Matrix2X2 a, Matrix2X2 b)