Double precision 2x2 Matrix struct. More...
Public Member Functions | |
Matrix2D (double a11, double a12, double a21, double a22) | |
Construct a 2x2 matrix. More... | |
Matrix2D (Angle rotation) | |
Construct a 2x2 matrix that represents a rotation. More... | |
Matrix2D (Angle rotation, double scale) | |
Construct a 2x2 matrix that is a combination of a rotation and scale operation. More... | |
Matrix2D (double scale) | |
Construct a 2x2 matrix that represents a scaling. More... | |
Matrix2D (double scaleX, double scaleY) | |
Constructs a 2x2 matrix that represent a scaling with different scaling in x and y directions. More... | |
Matrix2D (Point2Dd column1, Point2Dd column2) | |
Construct a 2x2 matrix from two column vectors. More... | |
void | Invert () |
Invert this matrix in-place if possible. More... | |
Matrix2D | Inverse () |
Get the inverse of this matrix if possible. More... | |
override bool | Equals (object obj) |
Comparison function. More... | |
override int | GetHashCode () |
Hash code. More... | |
override string | ToString () |
String conversion. More... | |
Static Public Member Functions | |
static Matrix2D | operator- (Matrix2D lhs, Matrix2D rhs) |
Subtraction operator for MatrixD structs. More... | |
static Matrix2D | operator+ (Matrix2D lhs, Matrix2D rhs) |
Addition operator for MatrixD structs. More... | |
static Matrix2D | operator* (Matrix2D lhs, Matrix2D rhs) |
Multiplication operator for MatrixD structs. More... | |
static bool | operator!= (Matrix2D lhs, Matrix2D rhs) |
Comparison operator for MatrixD structs. More... | |
static bool | operator== (Matrix2D lhs, Matrix2D rhs) |
Comparison operator for MatrixD structs. More... | |
static Matrix2D | operator* (double lhs, Matrix2D rhs) |
Multiplication operator between MatrixD and scalar. More... | |
Static Public Attributes | |
static readonly Matrix2D | Identity = new Matrix2D(1.0, 0.0, 0.0, 1.0) |
1-element for matrix operations. | |
static readonly Matrix2D | Empty = new Matrix2D() |
0-element for matrix operations. | |
Properties | |
double | A11 [get, set] |
Top left matrix element. | |
double | A12 [get, set] |
Top right matrix element. | |
double | A21 [get, set] |
Bottom left matrix element. | |
double | A22 [get, set] |
Bottom right matrix element. | |
double | this[int row, int column] [get, set] |
Index access. More... | |
double | Det [get] |
Matrix determinant. | |
Double precision 2x2 Matrix struct.
Matrix2D | ( | double | a11, |
double | a12, | ||
double | a21, | ||
double | a22 | ||
) |
Construct a 2x2 matrix.
a11 | Top left matrix element |
a12 | Top right matrix element |
a21 | Bottom left matrix element |
a22 | Bottom right matrix element |
Construct a 2x2 matrix that represents a rotation.
rotation | Angle of the rotation |
Construct a 2x2 matrix that is a combination of a rotation and scale operation.
rotation | Rotation angle to create the matrix for |
scale | Scale factor to create the matrix for |
Matrix2D | ( | double | scale | ) |
Construct a 2x2 matrix that represents a scaling.
scale | Scale factor to create the matrix for. |
Matrix2D | ( | double | scaleX, |
double | scaleY | ||
) |
Constructs a 2x2 matrix that represent a scaling with different scaling in x and y directions.
scaleX | Scale factor in X direction to create the matrix for. |
scaleY | Scale factor in Y direction to create the matrix for. |
Construct a 2x2 matrix from two column vectors.
column1 | Column vector one |
column2 | Columns vector two |
override bool Equals | ( | object | obj | ) |
Comparison function.
obj | Object to compare to |
true
if obj == this, false
otherwiseoverride int GetHashCode | ( | ) |
Hash code.
Matrix2D Inverse | ( | ) |
Get the inverse of this matrix if possible.
DivideByZeroException | If the matrix cannot be inverted. |
void Invert | ( | ) |
Invert this matrix in-place if possible.
DivideByZeroException | If the matrix cannot be inverted. |
Comparison operator for MatrixD structs.
lhs | Left hand side operand |
rhs | Right hand side operand |
Multiplication operator between MatrixD and scalar.
lhs | Scalar to multiply the matrix with. |
rhs | Matrix to be multiplied. |
Multiplication operator for MatrixD structs.
lhs | Left hand side operand |
rhs | Right hand side operand |
Addition operator for MatrixD structs.
lhs | Left hand side operand |
rhs | Right hand side operand |
Subtraction operator for MatrixD structs.
lhs | Left hand side operand |
rhs | Right hand side operand |
Comparison operator for MatrixD structs.
lhs | Left hand side operand |
rhs | Right hand side operand |
override string ToString | ( | ) |
String conversion.
|
getset |
Index access.
row | The row, or "Y" index to get. |
column | The column, or "X" index to get. |