Cleanup/minify HitWindows

This commit is contained in:
smoogipoo
2018-02-02 19:35:44 +09:00
parent d371425c87
commit e45b26c742
2 changed files with 57 additions and 123 deletions

View File

@ -40,5 +40,17 @@ namespace osu.Game.Beatmaps
return mid - (mid - min) * (5 - difficulty) / 5;
return mid;
}
/// <summary>
/// Maps a difficulty value [0, 10] to a two-piece linear range of values.
/// </summary>
/// <param name="difficulty">The difficulty value to be mapped.</param>
/// <param name="range">The values that define the two linear ranges.</param>
/// <param name="range.min">Minimum of the resulting range which will be achieved by a difficulty value of 0.</param>
/// <param name="range.mid">Midpoint of the resulting range which will be achieved by a difficulty value of 5.</param>
/// <param name="range.max">Maximum of the resulting range which will be achieved by a difficulty value of 10.</param>
/// <returns>Value to which the difficulty value maps in the specified range.</returns>
public static double DifficultyRange(double difficulty, (double min, double mid, double max) range)
=> DifficultyRange(difficulty, range.min, range.mid, range.max);
}
}