public static Vector2 Right(float rotation) { Vector2 direction = new Vector2((float)Math.Cos(rotation), (float)Math.Sin(rotation)); direction.Normalize(); return(AdvancedMath.Rotate(new Vector2(1, 1) * direction, 180)); }
public static Vector2 Right(Vector2 a, Vector2 b) { float rotation = (float)Math.Atan2(b.Y - a.Y, b.X - a.X); Vector2 direction = new Vector2((float)Math.Cos(rotation), (float)Math.Sin(rotation)); direction.Normalize(); return(AdvancedMath.Rotate(new Vector2(1, 1) * direction, 180)); }