23 lines
551 B
C#
23 lines
551 B
C#
|
|
using System.Numerics;
|
|||
|
|
|
|||
|
|
namespace Content.Shared._Amour.ContentMath;
|
|||
|
|
|
|||
|
|
public static class ContentMathHelper
|
|||
|
|
{
|
|||
|
|
public static Vector2 Transform(this Matrix3x2 matrix, Vector2 vector)
|
|||
|
|
{
|
|||
|
|
return Vector2.Transform(vector, matrix);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static void Multiply(Matrix3x2 scaleMatrix, Matrix3x2 worldMatrix, out Matrix3x2 p2)
|
|||
|
|
{
|
|||
|
|
p2 = scaleMatrix * worldMatrix;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static Matrix3x2 Invert(this Matrix3x2 matrix)
|
|||
|
|
{
|
|||
|
|
Matrix3x2.Invert(matrix, out Matrix3x2 result);
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
}
|