1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:07:24 +08:00

Fix code issues

This commit is contained in:
StanR 2024-11-07 21:23:26 +05:00
parent 78c97d2cd7
commit c9d3b6557d
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
/// A distance by which all distances should be scaled in order to assume a uniform circle size. /// A distance by which all distances should be scaled in order to assume a uniform circle size.
/// </summary> /// </summary>
public const int NORMALISED_RADIUS = 50; // Change radius to 50 to make 100 the diameter. Easier for mental maths. public const int NORMALISED_RADIUS = 50; // Change radius to 50 to make 100 the diameter. Easier for mental maths.
public const int NORMALISED_DIAMETER = NORMALISED_RADIUS * 2; public const int NORMALISED_DIAMETER = NORMALISED_RADIUS * 2;
public const int MIN_DELTA_TIME = 25; public const int MIN_DELTA_TIME = 25;

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Difficulty.Utils
/// <param name="multiplier">Growth rate of the function</param> /// <param name="multiplier">Growth rate of the function</param>
/// <param name="midpointOffset">How much the function midpoint is offset from zero <paramref name="x"/></param> /// <param name="midpointOffset">How much the function midpoint is offset from zero <paramref name="x"/></param>
/// <returns>The output of logistic function of <paramref name="x"/></returns> /// <returns>The output of logistic function of <paramref name="x"/></returns>
public static double Logistic(double x, double maxValue = 1, double multiplier = 1, double midpointOffset = 0) => maxValue / (1 + Math.Exp(multiplier * (midpointOffset - x))); public static double Logistic(double x, double midpointOffset, double multiplier, double maxValue = 1) => maxValue / (1 + Math.Exp(multiplier * (midpointOffset - x)));
/// <summary> /// <summary>
/// Calculates a S-shaped logistic function (https://en.wikipedia.org/wiki/Logistic_function) /// Calculates a S-shaped logistic function (https://en.wikipedia.org/wiki/Logistic_function)