1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Cap rotation ratio to 1

This commit is contained in:
Henry Lin 2021-06-24 13:22:10 +08:00
parent 2268d7f8a5
commit 153e204d20

View File

@ -68,7 +68,11 @@ namespace osu.Game.Rulesets.Osu.Utils
);
}
return RotateVectorTowardsVector(posRelativeToPrev, playfield_middle - prevObjectPos, relativeRotationDistance * rotationRatio);
return RotateVectorTowardsVector(
posRelativeToPrev,
playfield_middle - prevObjectPos,
Math.Min(1, relativeRotationDistance * rotationRatio)
);
}
/// <summary>