1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Reduce amount of casting

This commit is contained in:
Bartłomiej Dach 2020-11-11 22:40:52 +01:00
parent 423f0fbda7
commit 1984a9f70d

View File

@ -69,10 +69,10 @@ namespace osu.Game.Tests.Visual.Ranking
for (int i = 0; i < 500; i++)
{
float angle = (float)random.NextDouble() * 2 * (float)Math.PI;
float radius = (float)random.NextDouble() * 0.5f * OsuHitObject.OBJECT_RADIUS;
double angle = random.NextDouble() * 2 * Math.PI;
double radius = random.NextDouble() * 0.5f * OsuHitObject.OBJECT_RADIUS;
Vector2 position = new Vector2(radius * (float)Math.Cos(angle), radius * (float)Math.Sin(angle));
var position = new Vector2((float)(radius * Math.Cos(angle)), (float)(radius * Math.Sin(angle)));
hitEvents.Add(new HitEvent(0, HitResult.Perfect, new HitCircle(), new HitCircle(), position));
}