mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 23:52:55 +08:00
Rename map
to mapRange
This commit is contained in:
parent
1470bb1563
commit
d1862d8cff
@ -291,7 +291,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
var distance = maxComboIndex == 0
|
var distance = maxComboIndex == 0
|
||||||
? (float)obj.Radius
|
? (float)obj.Radius
|
||||||
: map(obj.ComboIndex, 0, maxComboIndex, (float)obj.Radius, max_base_distance);
|
: mapRange(obj.ComboIndex, 0, maxComboIndex, (float)obj.Radius, max_base_distance);
|
||||||
if (obj.NewCombo) distance *= 1.5f;
|
if (obj.NewCombo) distance *= 1.5f;
|
||||||
if (obj.Kiai) distance *= 1.2f;
|
if (obj.Kiai) distance *= 1.2f;
|
||||||
distance = Math.Min(distance_cap, distance);
|
distance = Math.Min(distance_cap, distance);
|
||||||
@ -515,7 +515,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
/// <param name="toLow">Beginning of the new range.</param>
|
/// <param name="toLow">Beginning of the new range.</param>
|
||||||
/// <param name="toHigh">End of the new range.</param>
|
/// <param name="toHigh">End of the new range.</param>
|
||||||
/// <returns>The re-mapped number.</returns>
|
/// <returns>The re-mapped number.</returns>
|
||||||
private static float map(float value, float fromLow, float fromHigh, float toLow, float toHigh)
|
private static float mapRange(float value, float fromLow, float fromHigh, float toLow, float toHigh)
|
||||||
{
|
{
|
||||||
return (value - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow;
|
return (value - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user