Files
2023-06-20 13:17:31 -05:00

19 lines
441 B
C#

using System.Runtime.InteropServices;
using UnityEngine;
namespace SmartPoint.Mathematics
{
public static class Vector2Ext
{
public static float FastLengthSq(this ref Vector2 self)
{
return (self.x * self.x) + (self.y * self.y);
}
public static float FastCross(this ref Vector2 self, [In] ref Vector2 V)
{
return (self.x * V.y) - (self.y * V.x);
}
}
}