Closed dresswithpockets closed 7 years ago
@phxvyper Vector2.Divide cannot have 2 overloads with same parameter types?
@GuyInGrey amended along with the issues i had with the operators.
all changes with variations realized in merge https://github.com/PhoenixGameDevelopmentTeam/AptitudeEngine/commit/591b4f86eaaf5172ae8fa2cc56e3010acceebffc
New Functionality
static Vector2 Vector2.Add(Vector2 a, Vector2 b)
static Vector2 Vector2.Add(params Vector2[] vecs)
static Vector2 Vector2.BaryCentric(Vector2 a, Vector2 b, Vector2 c, float u, float v)
static Vector2 Vector2.Clamp(Vector2 a, Vector2 b, Vector2 c)
static Vector2 Vector2.Clamp(params Vector2[] vecs)
static Vector2 Vector2.Divide(Vector2 a, float scale)
static float Vector2.Dot(Vector2 a, Vector2 b)
static Vector2 Vector2.Lerp(Vector2 a, Vector2 b, float blend)
static Vector2 Vector2.Max(Vector2 left, Vector2 right)
static Vector2 Vector2.Min(Vector2 left, Vector2 right)
static Vector2 Vector2.Multiply(Vector2 a, float scale)
static Vector2 Vector2.Normalize(Vector2 a)
static Vector2 Vector2.Subtract(Vector2 a, Vector2 b)
Overload operators
Vector2 operator +(Vector2 left, Vector2 right)
Vector2 operator -(Vector2 left, Vector2 right)
Vector2 operator -(Vector2 left)
float operator *(Vector2 left, Vector2 right)
dot productVector2 operator *(Vector2 left, float scale)
just scale (not dot product)Vector2 operator *(float scale, Vector2 right)
just scale (not dot product)Vector2 operator /(Vector2 left, float scale)
Vector2 operator ==(Vector2 left, Vector2 right)
would beleft.Equals(right)
Vector2 operator !=(Vector2 left, Vector2 right)
would be!left.Equals(right)