Use float methods for math operations

This commit is contained in:
Dean Herbert 2020-10-01 17:06:05 +09:00
parent b1f2bdd579
commit 538973e394

View File

@ -183,8 +183,8 @@ namespace osu.Game.Rulesets.Osu.Edit
point.Y -= origin.Y;
Vector2 ret;
ret.X = (float)(point.X * Math.Cos(MathUtils.DegreesToRadians(angle)) + point.Y * Math.Sin(angle / 180f * Math.PI));
ret.Y = (float)(point.X * -Math.Sin(MathUtils.DegreesToRadians(angle)) + point.Y * Math.Cos(angle / 180f * Math.PI));
ret.X = point.X * MathF.Cos(MathUtils.DegreesToRadians(angle)) + point.Y * MathF.Sin(angle / 180f * MathF.PI);
ret.Y = point.X * -MathF.Sin(MathUtils.DegreesToRadians(angle)) + point.Y * MathF.Cos(angle / 180f * MathF.PI);
ret.X += origin.X;
ret.Y += origin.Y;