mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Formatting and minor optimisations
This commit is contained in:
@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
const double scale = 90;
|
const double scale = 90;
|
||||||
|
|
||||||
|
double applyDiminishingExp(double val) => Math.Pow(val, 0.99);
|
||||||
|
|
||||||
if (Previous.Count > 0)
|
if (Previous.Count > 0)
|
||||||
{
|
{
|
||||||
if (current.Angle != null && current.Angle.Value > angle_bonus_begin)
|
if (current.Angle != null && current.Angle.Value > angle_bonus_begin)
|
||||||
@ -31,20 +33,17 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
Math.Max(Previous[0].JumpDistance - scale, 0)
|
Math.Max(Previous[0].JumpDistance - scale, 0)
|
||||||
* Math.Pow(Math.Sin(current.Angle.Value - angle_bonus_begin), 2)
|
* Math.Pow(Math.Sin(current.Angle.Value - angle_bonus_begin), 2)
|
||||||
* Math.Max(current.JumpDistance - scale, 0));
|
* Math.Max(current.JumpDistance - scale, 0));
|
||||||
result = 1.5 * Math.Pow(Math.Max(0, angleBonus), 0.99) / Math.Max(timing_threshold, Previous[0].StrainTime);
|
result = 1.5 * applyDiminishingExp(Math.Max(0, angleBonus)) / Math.Max(timing_threshold, Previous[0].StrainTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double jumpDistanceExp = applyDiminishingExp(current.JumpDistance);
|
||||||
|
double travelDistanceExp = applyDiminishingExp(current.TravelDistance);
|
||||||
|
|
||||||
return Math.Max(
|
return Math.Max(
|
||||||
result + (
|
result + (jumpDistanceExp + travelDistanceExp + Math.Sqrt(travelDistanceExp * jumpDistanceExp)) / Math.Max(current.StrainTime, timing_threshold),
|
||||||
Math.Pow(current.JumpDistance, 0.99)
|
(Math.Sqrt(travelDistanceExp * jumpDistanceExp) + jumpDistanceExp + travelDistanceExp) / current.StrainTime
|
||||||
+ Math.Pow(current.TravelDistance, 0.99)
|
);
|
||||||
+ Math.Sqrt(Math.Pow(current.TravelDistance, 0.99) * Math.Pow(current.JumpDistance, 0.99)))
|
|
||||||
/ Math.Max(current.StrainTime, timing_threshold),
|
|
||||||
(Math.Sqrt(Math.Pow(current.TravelDistance, 0.99) * Math.Pow(current.JumpDistance, 0.99))
|
|
||||||
+ Math.Pow(current.JumpDistance, 0.99)
|
|
||||||
+ Math.Pow(current.TravelDistance, 0.99))
|
|
||||||
/ current.StrainTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (1 + (speedBonus - 1) * .75) * angleBonus * (0.95 + speedBonus * Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 3.5)) / current.StrainTime;
|
return (1 + (speedBonus - 1) * 0.75) * angleBonus * (0.95 + speedBonus * Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 3.5)) / current.StrainTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user