1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 13:22:55 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Objects
Bartłomiej Dach 5c6cd879dd
Adjust slider calculations to new method API
Code originally read

	Velocity = scoringDistance / beatLength
		 = BASE_SCORING_DISTANCE * SliderMultiplier * GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength

Given (mathematically, floats are not generally as forgiving):

	GetPrecisionAdjustedBeatLength() = beatLength / GetPrecisionAdjustedSliderVelocityMultiplier()

it follows that (inverting both sides):

	1 / GetPrecisionAdjustedBeatLength() = GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength

and therefore

	Velocity = BASE_SCORING_DISTANCE * SliderMultiplier * GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength
		 = BASE_SCORING_DISTANCE * SliderMultiplier / GetPrecisionAdjustedBeatLength()

and to recover `scoringDistance`

	scoringDistance = Velocity * beatLength
2023-09-15 12:30:25 +02:00
..
Drawables Rename variable 2023-09-12 20:51:22 +09:00
HitCircle.cs Automated pass 2023-06-24 01:00:03 +09:00
ISliderProgress.cs Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
OsuHitObject.cs Automated pass 2023-06-24 01:00:03 +09:00
Slider.cs Adjust slider calculations to new method API 2023-09-15 12:30:25 +02:00
SliderEndCircle.cs Automated pass 2023-06-24 01:00:03 +09:00
SliderHeadCircle.cs Automated pass 2023-06-24 01:00:03 +09:00
SliderRepeat.cs Automated pass 2023-06-24 01:00:03 +09:00
SliderTailCircle.cs Automated pass 2023-06-24 01:00:03 +09:00
SliderTick.cs Automated pass 2023-06-24 01:00:03 +09:00
Spinner.cs Rename variable 2023-09-12 20:51:22 +09:00
SpinnerBonusTick.cs Automated pass 2023-06-24 01:00:03 +09:00
SpinnerTick.cs Automated pass 2023-06-24 01:00:03 +09:00