Mat22
Declaration
public struct tainicom.Aether.Physics2D.Common.Mat22
A 2-by-2 matrix. Stored in column-major order.
Constructors
Mat22
Construct this matrix using columns.
void Mat22(Vector2 c1, Vector2 c2)
Parameters:
| Name | Type | Description |
|---|---|---|
c1 |
Strawberry.Math.Vector2 |
The c1. |
c2 |
Strawberry.Math.Vector2 |
The c2. |
Mat22
Construct this matrix using scalars.
void Mat22(float a11, float a12, float a21, float a22)
Parameters:
| Name | Type | Description |
|---|---|---|
a11 |
System.Single |
The a11. |
a12 |
System.Single |
The a12. |
a21 |
System.Single |
The a21. |
a22 |
System.Single |
The a22. |
Properties
Inverse
Mat22 Inverse { get }
Fields
ex
Vector2 ex
ey
Vector2 ey
Methods
Set
Initialize this matrix using columns.
void Set(Vector2 c1, Vector2 c2)
Parameters:
| Name | Type | Description |
|---|---|---|
c1 |
Strawberry.Math.Vector2 |
The c1. |
c2 |
Strawberry.Math.Vector2 |
The c2. |
SetIdentity
Set this to the identity matrix.
void SetIdentity()
SetZero
Set this matrix to all zeros.
void SetZero()
Solve
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
Vector2 Solve(Vector2 b)
Parameters:
| Name | Type | Description |
|---|---|---|
b |
Strawberry.Math.Vector2 |
The b. |
Add static
void Add(ref Mat22 A, ref Mat22 B, out Mat22 R)
Parameters:
| Name | Type | Description |
|---|---|---|
A |
ref tainicom.Aether.Physics2D.Common.Mat22 |
|
B |
ref tainicom.Aether.Physics2D.Common.Mat22 |
|
R |
out tainicom.Aether.Physics2D.Common.Mat22 |