10 lines
326 B
C#
10 lines
326 B
C#
|
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);
|
||
|
}
|