feat: Vector2DExtensions

This commit is contained in:
Syntriax 2024-01-22 12:40:32 +03:00
parent e8d0ff030a
commit 225e65fa90
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
namespace Syntriax.Engine.Physics2D.Primitives;
public static class Vector2DExtensions
{
public static float Length(this Vector2D point) => Vector2D.Length(point);
public static float LengthSqr(this Vector2D point) => Vector2D.LengthSqr(point);
public static Vector2D Normalize(this Vector2D point) => Vector2D.Normalize(point);
public static float Cross(this Vector2D left, Vector2D right) => Vector2D.Cross(left, right);
public static float AngleBetween(this Vector2D left, Vector2D right) => Vector2D.Angle(left, right);
public static float Dot(this Vector2D left, Vector2D right) => Vector2D.Dot(left, right);
}