feat: TransformExtensions.TransformVector2D
This commit is contained in:
parent
87bf47eefd
commit
b3d404bb6b
|
@ -0,0 +1,9 @@
|
|||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public static class TransformExtensions
|
||||
{
|
||||
public static Vector2D TransformVector2D(this ITransform transform, Vector2D vector)
|
||||
=> vector.Scale(transform.Scale)
|
||||
.Rotate(transform.Rotation * Math.DegreeToRadian)
|
||||
.Add(transform.Position);
|
||||
}
|
Loading…
Reference in New Issue