23 lines
1.4 KiB
C#
23 lines
1.4 KiB
C#
|
namespace Syntriax.Engine.Core;
|
||
|
|
||
|
public static class Vector2DExtensions
|
||
|
{
|
||
|
public static float Length(this Vector2D vector) => Vector2D.Length(vector);
|
||
|
public static float LengthSquared(this Vector2D vector) => Vector2D.LengthSquared(vector);
|
||
|
public static float Distance(this Vector2D from, Vector2D to) => Vector2D.Distance(from, to);
|
||
|
|
||
|
public static Vector2D Reflect(this Vector2D vector, Vector2D normal) => Vector2D.Reflect(vector, normal);
|
||
|
public static Vector2D Normalize(this Vector2D vector) => Vector2D.Normalize(vector);
|
||
|
public static Vector2D FromTo(this Vector2D from, Vector2D to) => Vector2D.FromTo(from, to);
|
||
|
public static Vector2D Scale(this Vector2D vector, Vector2D scale) => Vector2D.FromTo(vector, scale);
|
||
|
|
||
|
public static Vector2D Min(this Vector2D left, Vector2D right) => Vector2D.Min(left, right);
|
||
|
public static Vector2D Max(this Vector2D left, Vector2D right) => Vector2D.Max(left, right);
|
||
|
public static Vector2D Clamp(this Vector2D vector, Vector2D min, Vector2D max) => Vector2D.Clamp(vector, min, max);
|
||
|
public static Vector2D Lerp(this Vector2D from, Vector2D to, float t) => Vector2D.Lerp(from, to, t);
|
||
|
|
||
|
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);
|
||
|
}
|