Syntriax.Engine/Engine.Core/Extensions/Abstract/TransformExtensions.cs

10 lines
326 B
C#
Raw Normal View History

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);
}