40 public Matrix3x2(
float m11,
float m12,
float m21,
float m22,
float m31,
float m32)
53 result.M11 = value1.M11 + value2.
M11;
54 result.M12 = value1.M12 + value2.
M12;
55 result.M21 = value1.M21 + value2.
M21;
56 result.M22 = value1.M22 + value2.
M22;
57 result.M31 = value1.M31 + value2.
M31;
58 result.M32 = value1.M32 + value2.
M32;
66 return value1.M32 == value2.
M32;
73 return !(value1 == value2);
79 result.M11 = value1.M11 * value2.M11 + value1.M12 * value2.
M21;
80 result.M12 = value1.M11 * value2.M12 + value1.M12 * value2.
M22;
81 result.M21 = value1.M21 * value2.M11 + value1.M22 * value2.
M21;
82 result.M22 = value1.M21 * value2.M12 + value1.M22 * value2.
M22;
83 result.M31 = value1.M31 * value2.M11 + value1.M32 * value2.M21 + value2.
M31;
84 result.M32 = value1.M31 * value2.M12 + value1.M32 * value2.M22 + value2.
M32;
91 result.M11 = value1.M11 * value2;
92 result.M12 = value1.M12 * value2;
93 result.M21 = value1.M21 * value2;
94 result.M22 = value1.M22 * value2;
95 result.M31 = value1.M31 * value2;
96 result.M32 = value1.M32 * value2;
103 result.M11 = value1.M11 - value2.
M11;
104 result.M12 = value1.M12 - value2.
M12;
105 result.M21 = value1.M21 - value2.
M21;
106 result.M22 = value1.M22 - value2.
M22;
107 result.M31 = value1.M31 - value2.
M31;
108 result.M32 = value1.M32 - value2.
M32;
115 result.M11 = 0f -
value.M11;
116 result.M12 = 0f -
value.M12;
117 result.M21 = 0f -
value.M21;
118 result.M22 = 0f -
value.M22;
119 result.M31 = 0f -
value.M31;
120 result.M32 = 0f -
value.M32;
127 return value1 + value2;
135 if (radians > -1.7453294
E-05f && radians < 1.7453294
E-05f)
140 else if (radians > 1.570779f && radians < 1.5708138f)
145 else if (radians < -3.1415753f || radians > 3.1415753f)
150 else if (radians > -1.5708138f && radians < -1.570779f)
163 identity.M21 = 0f - num2;
173 if (radians > -1.7453294
E-05f && radians < 1.7453294
E-05f)
178 else if (radians > 1.570779f && radians < 1.5708138f)
183 else if (radians < -3.1415753f || radians > 3.1415753f)
188 else if (radians > -1.5708138f && radians < -1.570779f)
198 float m = centerPoint.X * (1f - num) + centerPoint.
Y * num2;
199 float m2 = centerPoint.Y * (1f - num) - centerPoint.
X * num2;
203 result.M21 = 0f - num2;
213 identity.M11 = scales.
X;
214 identity.M22 = scales.
Y;
221 identity.M11 = xScale;
222 identity.M22 = yScale;
229 float m = centerPoint.X * (1f - xScale);
230 float m2 = centerPoint.Y * (1f - yScale);
231 identity.M11 = xScale;
232 identity.M22 = yScale;
241 float m = centerPoint.X * (1f - scales.
X);
242 float m2 = centerPoint.Y * (1f - scales.
Y);
243 identity.M11 = scales.
X;
244 identity.M22 = scales.
Y;
253 identity.M11 = scale;
254 identity.M22 = scale;
261 float m = centerPoint.X * (1f - scale);
262 float m2 = centerPoint.Y * (1f - scale);
263 identity.M11 = scale;
264 identity.M22 = scale;
285 float m = (0f - centerPoint.
Y) * num;
286 float m2 = (0f - centerPoint.
X) * num2;
297 identity.M31 = position.
X;
298 identity.M32 = position.
Y;
305 identity.M31 = xPosition;
306 identity.M32 = yPosition;
312 float num = matrix.M11 * matrix.M22 - matrix.M21 * matrix.
M12;
315 result =
new Matrix3x2(
float.NaN,
float.NaN,
float.NaN,
float.NaN,
float.NaN,
float.NaN);
318 float num2 = 1f / num;
319 result.M11 = matrix.M22 * num2;
320 result.M12 = (0f - matrix.
M12) * num2;
321 result.M21 = (0f - matrix.
M21) * num2;
322 result.M22 = matrix.M11 * num2;
323 result.M31 = (matrix.M21 * matrix.M32 - matrix.M31 * matrix.
M22) * num2;
324 result.M32 = (matrix.M31 * matrix.M12 - matrix.M11 * matrix.
M32) * num2;
331 result.M11 = matrix1.M11 + (matrix2.M11 - matrix1.
M11) * amount;
332 result.M12 = matrix1.M12 + (matrix2.M12 - matrix1.
M12) * amount;
333 result.M21 = matrix1.M21 + (matrix2.M21 - matrix1.
M21) * amount;
334 result.M22 = matrix1.M22 + (matrix2.M22 - matrix1.
M22) * amount;
335 result.M31 = matrix1.M31 + (matrix2.M31 - matrix1.
M31) * amount;
336 result.M32 = matrix1.M32 + (matrix2.M32 - matrix1.
M32) * amount;
343 return value1 * value2;
349 return value1 * value2;
361 return value1 - value2;
365 public override readonly
bool Equals([NotNullWhen(
true)]
object?
obj)
376 return this ==
other;
391 return $
"{{ {{M11:{M11} M12:{M12}}} {{M21:{M21} M22:{M22}}} {{M31:{M31} M32:{M32}}} }}";
static float Abs(float x)
static float Cos(float x)
static float IEEERemainder(float x, float y)
static float Sin(float x)
static float Tan(float x)
readonly float GetDeterminant()
static readonly Matrix3x2 _identity
static Matrix3x2 Subtract(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 CreateTranslation(Vector2 position)
readonly bool Equals(Matrix3x2 other)
static Matrix3x2 CreateTranslation(float xPosition, float yPosition)
static bool operator==(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 CreateRotation(float radians)
Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32)
static Matrix3x2 Multiply(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 CreateRotation(float radians, Vector2 centerPoint)
override readonly int GetHashCode()
static Matrix3x2 Identity
override readonly string ToString()
static Matrix3x2 CreateScale(float xScale, float yScale, Vector2 centerPoint)
static Matrix3x2 CreateSkew(float radiansX, float radiansY, Vector2 centerPoint)
static Matrix3x2 CreateScale(float scale)
static bool operator!=(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 CreateScale(Vector2 scales)
static Matrix3x2 CreateScale(Vector2 scales, Vector2 centerPoint)
static bool Invert(Matrix3x2 matrix, out Matrix3x2 result)
static Matrix3x2 operator+(Matrix3x2 value1, Matrix3x2 value2)
override readonly bool Equals([NotNullWhen(true)] object? obj)
static Matrix3x2 CreateScale(float scale, Vector2 centerPoint)
static Matrix3x2 CreateScale(float xScale, float yScale)
static Matrix3x2 Multiply(Matrix3x2 value1, float value2)
static Matrix3x2 Lerp(Matrix3x2 matrix1, Matrix3x2 matrix2, float amount)
static Matrix3x2 Add(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 Negate(Matrix3x2 value)
static Matrix3x2 CreateSkew(float radiansX, float radiansY)
static Matrix3x2 operator*(Matrix3x2 value1, Matrix3x2 value2)
static Matrix3x2 operator-(Matrix3x2 value1, Matrix3x2 value2)