USe MathF in all applicable places

This commit is contained in:
Henry Lin
2022-04-11 14:15:08 +08:00
parent 3bebc88306
commit 72cb3d6ad6
2 changed files with 10 additions and 10 deletions

View File

@ -174,11 +174,11 @@ namespace osu.Game.Rulesets.Osu.Utils
/// <returns>The rotated vector.</returns>
private static Vector2 rotateVector(Vector2 vector, float rotation)
{
float angle = (float)Math.Atan2(vector.Y, vector.X) + rotation;
float angle = MathF.Atan2(vector.Y, vector.X) + rotation;
float length = vector.Length;
return new Vector2(
length * (float)Math.Cos(angle),
length * (float)Math.Sin(angle)
length * MathF.Cos(angle),
length * MathF.Sin(angle)
);
}
}