1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Use framework method to convert rad to deg

This commit is contained in:
mcendu 2020-03-04 13:51:12 +08:00
parent b6378c7ae2
commit e2ea92e21f

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Utils;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables;
@ -40,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Mods
if (drawable is DrawableSpinner spinner)
{
if (spinner.Disc.Valid)
spinner.Disc.Rotate(180 / MathF.PI * (float)spinner.Clock.ElapsedFrameTime * 0.03f);
spinner.Disc.Rotate(MathUtils.RadiansToDegrees((float)spinner.Clock.ElapsedFrameTime * 0.03f));
if (!spinner.SpmCounter.IsPresent)
spinner.SpmCounter.FadeIn(spinner.HitObject.TimeFadeIn);
}