public static Vector2f Rotate(Vector2f point, float radians) { float cosRadians = FlaiMath.Cos(radians * Mathf.Deg2Rad); float sinRadians = FlaiMath.Sin(radians * Mathf.Deg2Rad); return(new Vector2( point.X * cosRadians - point.Y * sinRadians, point.X * sinRadians + point.Y * cosRadians)); }
public static Vector2d Rotate(Vector2d point, double radians) { double cosRadians = FlaiMath.Cos(radians); double sinRadians = FlaiMath.Sin(radians); return(new Vector2d( point.X * cosRadians - point.Y * sinRadians, point.X * sinRadians + point.Y * cosRadians)); }