Vector2Helper
Namespace: Murder.Utilities
Assembly: Murder.dll
public static class Vector2Helper
⭐ Properties
Center
public static Vector2 Center { get; }
Returns
Vector2
Down
public static Vector2 Down { get; }
Returns
Vector2
Left
public static Vector2 Left { get; }
Returns
Vector2
Right
public static Vector2 Right { get; }
Returns
Vector2
Up
public static Vector2 Up { get; }
Returns
Vector2
⭐ Methods
CalculateAngle(Vector2, Vector2, Vector2)
public float CalculateAngle(Vector2 a, Vector2 b, Vector2 c)
Calculates the internal angle of a triangle.
Parameters
a
Vector2
b
Vector2
c
Vector2
Returns
float
Deviation(Vector2, Vector2)
public float Deviation(Vector2 vec1, Vector2 vec2)
Parameters
vec1
Vector2
vec2
Vector2
Returns
float
FromAngle(float)
public Vector2 FromAngle(float angle)
Creates a vector from an angle in radians.
Parameters
angle
float
Returns
Vector2
LerpSmooth(Vector2, Vector2, float, float)
public Vector2 LerpSmooth(Vector2 from, Vector2 to, float deltaTime, float halfLife)
Parameters
from
Vector2
to
Vector2
deltaTime
float
halfLife
float
Returns
Vector2
LerpSnap(Vector2, Vector2, double, float)
public Vector2 LerpSnap(Vector2 origin, Vector2 target, double factor, float threshold)
Parameters
origin
Vector2
target
Vector2
factor
double
threshold
float
Returns
Vector2
LerpSnap(Vector2, Vector2, float, float)
public Vector2 LerpSnap(Vector2 origin, Vector2 target, float factor, float threshold)
Parameters
origin
Vector2
target
Vector2
factor
float
threshold
float
Returns
Vector2
Max(Vector2, Vector2)
public Vector2 Max(Vector2 first, Vector2 second)
Parameters
first
Vector2
second
Vector2
Returns
Vector2
Min(Vector2, Vector2)
public Vector2 Min(Vector2 first, Vector2 second)
Parameters
first
Vector2
second
Vector2
Returns
Vector2
RoundTowards(Vector2, Vector2)
public Vector2 RoundTowards(Vector2 value, Vector2 towards)
Parameters
value
Vector2
towards
Vector2
Returns
Vector2
Squish(float)
public Vector2 Squish(float ammount)
Returns a one unit vector, squished by
Parameters
ammount
float
Returns
Vector2
⚡