18 lines
1.0 KiB
C#
18 lines
1.0 KiB
C#
namespace Syntriax.Engine.Physics2D.Primitives;
|
|
|
|
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 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);
|
|
}
|