<PackageReference Include="System.Numerics.Vectors" Version="4.3.0" />

System.Numerics.Matrix3x2

public struct Matrix3x2 : IEquatable<Matrix3x2>
A structure encapsulating a 3x2 matrix.
public float M11

The first element of the first row

public float M12

The second element of the first row

public float M21

The first element of the second row

public float M22

The second element of the second row

public float M31

The first element of the third row

public float M32

The second element of the third row

public static Matrix3x2 Identity { get; }

Returns the multiplicative identity matrix.

public bool IsIdentity { get; }

Returns whether the matrix is the identity matrix.

public Vector2 Translation { get; set; }

Gets or sets the translation component of this matrix.

public Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32)

Constructs a Matrix3x2 from the given components.

public static Matrix3x2 Add(Matrix3x2 value1, Matrix3x2 value2)

Adds each matrix element in value1 with its corresponding element in value2.

public static Matrix3x2 CreateRotation(float radians)

Creates a rotation matrix using the given rotation in radians.

public static Matrix3x2 CreateRotation(float radians, Vector2 centerPoint)

Creates a rotation matrix using the given rotation in radians and a center point.

public static Matrix3x2 CreateScale(float xScale, float yScale)

Creates a scale matrix from the given X and Y components.

public static Matrix3x2 CreateScale(float xScale, float yScale, Vector2 centerPoint)

Creates a scale matrix that is offset by a given center point.

public static Matrix3x2 CreateScale(Vector2 scales)

Creates a scale matrix from the given vector scale.

public static Matrix3x2 CreateScale(Vector2 scales, Vector2 centerPoint)

Creates a scale matrix from the given vector scale with an offset from the given center point.

public static Matrix3x2 CreateScale(float scale)

Creates a scale matrix that scales uniformly with the given scale.

public static Matrix3x2 CreateScale(float scale, Vector2 centerPoint)

Creates a scale matrix that scales uniformly with the given scale with an offset from the given center.

public static Matrix3x2 CreateSkew(float radiansX, float radiansY)

Creates a skew matrix from the given angles in radians.

public static Matrix3x2 CreateSkew(float radiansX, float radiansY, Vector2 centerPoint)

Creates a skew matrix from the given angles in radians and a center point.

public static Matrix3x2 CreateTranslation(Vector2 position)

Creates a translation matrix from the given vector.

public static Matrix3x2 CreateTranslation(float xPosition, float yPosition)

Creates a translation matrix from the given X and Y components.

public static bool Invert(Matrix3x2 matrix, out Matrix3x2 result)

Attempts to invert the given matrix. If the operation succeeds, the inverted matrix is stored in the result parameter.

public static Matrix3x2 Lerp(Matrix3x2 matrix1, Matrix3x2 matrix2, float amount)

Linearly interpolates from matrix1 to matrix2, based on the third parameter.

public static Matrix3x2 Multiply(Matrix3x2 value1, Matrix3x2 value2)

Multiplies two matrices together and returns the resulting matrix.

public static Matrix3x2 Multiply(Matrix3x2 value1, float value2)

Scales all elements in a matrix by the given scalar factor.

public static Matrix3x2 Negate(Matrix3x2 value)

Negates the given matrix by multiplying all values by -1.

public static Matrix3x2 op_Addition(Matrix3x2 value1, Matrix3x2 value2)

Adds each matrix element in value1 with its corresponding element in value2.

public static bool op_Equality(Matrix3x2 value1, Matrix3x2 value2)

Returns a boolean indicating whether the given matrices are equal.

public static bool op_Inequality(Matrix3x2 value1, Matrix3x2 value2)

Returns a boolean indicating whether the given matrices are not equal.

public static Matrix3x2 op_Multiply(Matrix3x2 value1, Matrix3x2 value2)

Multiplies two matrices together and returns the resulting matrix.

public static Matrix3x2 op_Multiply(Matrix3x2 value1, float value2)

Scales all elements in a matrix by the given scalar factor.

public static Matrix3x2 op_Subtraction(Matrix3x2 value1, Matrix3x2 value2)

Subtracts each matrix element in value2 from its corresponding element in value1.

public static Matrix3x2 op_UnaryNegation(Matrix3x2 value)

Negates the given matrix by multiplying all values by -1.

public static Matrix3x2 Subtract(Matrix3x2 value1, Matrix3x2 value2)

Subtracts each matrix element in value2 from its corresponding element in value1.

public bool Equals(Matrix3x2 other)

Returns a boolean indicating whether the matrix is equal to the other given matrix.

public float GetDeterminant()

Calculates the determinant for this matrix. The determinant is calculated by expanding the matrix with a third column whose values are (0,0,1).