@rian8337/osu-base 4.0.0-beta.102 → 4.0.0-beta.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3223,10 +3223,17 @@ class Spinner extends HitObject {
|
|
|
3223
3223
|
// The average RPS required over the length of the spinner to clear the spinner.
|
|
3224
3224
|
let minRps;
|
|
3225
3225
|
switch (mode) {
|
|
3226
|
-
case exports.Modes.Droid:
|
|
3227
|
-
|
|
3228
|
-
|
|
3226
|
+
case exports.Modes.Droid: {
|
|
3227
|
+
// Mirror osu!droid's single-precision arithmetic. In double precision, the result
|
|
3228
|
+
// can land on the other side of a whole number, which shifts the rotation at which
|
|
3229
|
+
// bonus spins begin.
|
|
3230
|
+
const f = Math.fround;
|
|
3231
|
+
const droidSecondsDuration = f(f(Math.max(this.duration, 0)) / 1000);
|
|
3232
|
+
minRps = f(2 + f(f(2 * f(difficulty.od)) / 10));
|
|
3233
|
+
this._spinsRequired =
|
|
3234
|
+
droidSecondsDuration < 0.05 ? f(0.1) : f(minRps * droidSecondsDuration);
|
|
3229
3235
|
break;
|
|
3236
|
+
}
|
|
3230
3237
|
case exports.Modes.Osu:
|
|
3231
3238
|
minRps = BeatmapDifficulty.difficultyRange(difficulty.od, 90, 150, 225) / 60;
|
|
3232
3239
|
// Allow a 0.1ms floating point precision error in the calculation of the duration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-base",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.103",
|
|
4
4
|
"description": "Base module for all osu! related modules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "3f35122c29be5cf8a6d9ef612bfec5c93cfc2956"
|
|
39
39
|
}
|