Rename map to mapRange

This commit is contained in:
Henry Lin 2021-07-04 10:01:56 +08:00
parent 1470bb1563
commit d1862d8cff

View File

@ -291,7 +291,7 @@ namespace osu.Game.Rulesets.Osu.Mods
var distance = maxComboIndex == 0
? (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.Kiai) distance *= 1.2f;
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="toHigh">End of the new range.</param>
/// <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;
}