public float Length(Vector vector) { return (float)Math.Sqrt((double)(vector.X * vector.X + vector.Y * vector.Y)); }
public static Vector Subtract(Vector value1, Vector value2) { return new Vector(value1.X - value2.X, value1.Y - value1.Y); }
public bool Equals(Vector other) { return X == other.X && Y == other.Y; }
public static Vector Negate(Vector value) { return new Vector(-value.X, -value.Y); }
public static Vector Normalize(Vector value) { return new Vector(value.X / value.Length(), value.Y / value.Length()); }
public static Vector Multiply(Vector value1, float scaleFactor) { return new Vector(value1.X * scaleFactor, value1.Y * scaleFactor); }
public static Vector Multiply(Vector value1, Vector value2) { return new Vector(value1.X * value2.X, value1.Y * value2.Y); }
public static Vector Min(Vector value1, Vector value2) { return new Vector(value1.X <= value2.X ? value1.X : value2.X, value1.Y <= value2.Y ? value1.Y : value2.Y); }
public static void Min(ref Vector value1, ref Vector value2, out Vector result) { result = Vector.Min(value1, value2); }
public static float Dot(Vector vector1, Vector vector2) { return vector1.X * vector2.X + vector1.Y * vector2.Y; }
public static void Dot(ref Vector value1, ref Vector value2, out float result) { result = Vector.Dot(value1, value2); }
public static Vector Divide(Vector value1, Vector value2) { return new Vector(value1.X / value2.X, value1.Y / value2.Y); }
public static Vector Divide(Vector value1, float divider) { return new Vector(value1.X / divider, value1.Y / divider); }
public static void Distance(ref Vector value1, ref Vector value2, out float result) { result = Vector.Distance(value1, value2); }
public static float Distance(Vector v1, Vector v2) { return (float)Math.Sqrt((double)((v1.X - v2.X) * (v1.X - v2.X) + (v1.Y - v2.Y) * (v1.Y - v2.Y))); }
public static Vector Add(Vector v1, Vector v2) { return new Vector(v1.X + v2.X, v1.Y + v2.Y); }