You've already forked Dpr-ScriptsOnly
mirror of
https://github.com/izzy2lost/Dpr-ScriptsOnly.git
synced 2026-03-10 11:49:05 -07:00
19 lines
441 B
C#
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);
|
|
}
|
|
}
|
|
}
|