@rian8337/osu-base 4.0.0-beta.19 → 4.0.0-beta.24

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 CHANGED
@@ -377,6 +377,19 @@ class Vector2 {
377
377
  * Contains difficulty settings of a beatmap.
378
378
  */
379
379
  class BeatmapDifficulty {
380
+ /**
381
+ * The approach rate of the beatmap.
382
+ */
383
+ get ar() {
384
+ var _a;
385
+ return (_a = this._ar) !== null && _a !== void 0 ? _a : this.od;
386
+ }
387
+ /**
388
+ * The approach rate of the beatmap.
389
+ */
390
+ set ar(value) {
391
+ this._ar = value;
392
+ }
380
393
  constructor(shallowCopy) {
381
394
  /**
382
395
  * The circle size of the beatmap.
@@ -401,7 +414,7 @@ class BeatmapDifficulty {
401
414
  if (!shallowCopy) {
402
415
  return;
403
416
  }
404
- this.ar = shallowCopy.ar;
417
+ this._ar = shallowCopy._ar;
405
418
  this.cs = shallowCopy.cs;
406
419
  this.od = shallowCopy.od;
407
420
  this.hp = shallowCopy.hp;
@@ -852,22 +865,22 @@ class OsuHitWindow extends HitWindow {
852
865
  * @returns The difficulty statistics of the beatmap.
853
866
  */
854
867
  function calculateDroidDifficultyStatistics(options) {
855
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
868
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
856
869
  const overallSpeedMultiplier = calculateSpeedMultiplierFromMods((_a = options.mods) !== null && _a !== void 0 ? _a : [], options.oldStatistics) * ((_b = options.customSpeedMultiplier) !== null && _b !== void 0 ? _b : 1);
857
870
  const difficulty = new BeatmapDifficulty();
858
871
  difficulty.cs = (_c = options.circleSize) !== null && _c !== void 0 ? _c : difficulty.cs;
859
- difficulty.ar = (_e = (_d = options.approachRate) !== null && _d !== void 0 ? _d : difficulty.ar) !== null && _e !== void 0 ? _e : difficulty.od;
860
- difficulty.od = (_f = options.overallDifficulty) !== null && _f !== void 0 ? _f : difficulty.od;
861
- difficulty.hp = (_g = options.healthDrain) !== null && _g !== void 0 ? _g : difficulty.hp;
862
- const difficultyAdjustMod = (_h = options.mods) === null || _h === void 0 ? void 0 : _h.find((mod) => mod instanceof ModDifficultyAdjust);
863
- (_j = options.mods) === null || _j === void 0 ? void 0 : _j.forEach((mod) => {
872
+ difficulty.ar = (_d = options.approachRate) !== null && _d !== void 0 ? _d : difficulty.ar;
873
+ difficulty.od = (_e = options.overallDifficulty) !== null && _e !== void 0 ? _e : difficulty.od;
874
+ difficulty.hp = (_f = options.healthDrain) !== null && _f !== void 0 ? _f : difficulty.hp;
875
+ const difficultyAdjustMod = (_g = options.mods) === null || _g === void 0 ? void 0 : _g.find((mod) => mod instanceof ModDifficultyAdjust);
876
+ (_h = options.mods) === null || _h === void 0 ? void 0 : _h.forEach((mod) => {
864
877
  if (mod.isApplicableToDifficulty()) {
865
878
  mod.applyToDifficulty(exports.Modes.droid, difficulty);
866
879
  }
867
880
  });
868
881
  // Special handling for difficulty adjust mod where difficulty statistics are forced.
869
882
  difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.applyToDifficulty(exports.Modes.droid, difficulty);
870
- (_k = options.mods) === null || _k === void 0 ? void 0 : _k.forEach((mod, _, arr) => {
883
+ (_j = options.mods) === null || _j === void 0 ? void 0 : _j.forEach((mod, _, arr) => {
871
884
  var _a;
872
885
  if (mod.isApplicableToDifficultyWithSettings()) {
873
886
  mod.applyToDifficultyWithSettings(exports.Modes.droid, difficulty, arr, (_a = options.customSpeedMultiplier) !== null && _a !== void 0 ? _a : 1);
@@ -887,7 +900,7 @@ function calculateDroidDifficultyStatistics(options) {
887
900
  difficulty.ar = convertApproachRateMilliseconds(approachRateMilliseconds);
888
901
  }
889
902
  if (options.overallDifficulty !== undefined) {
890
- const isPrecise = (_m = (_l = options.mods) === null || _l === void 0 ? void 0 : _l.some((mod) => mod instanceof ModPrecise)) !== null && _m !== void 0 ? _m : false;
903
+ const isPrecise = (_l = (_k = options.mods) === null || _k === void 0 ? void 0 : _k.some((mod) => mod instanceof ModPrecise)) !== null && _l !== void 0 ? _l : false;
891
904
  let hitWindowGreat = new DroidHitWindow(difficulty.od).hitWindowFor300(isPrecise);
892
905
  if ((difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.od) === undefined) {
893
906
  hitWindowGreat /= overallSpeedMultiplier;
@@ -922,23 +935,23 @@ function calculateDroidDifficultyStatistics(options) {
922
935
  * @returns The difficulty statistics of the beatmap.
923
936
  */
924
937
  function calculateOsuDifficultyStatistics(options) {
925
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
938
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
926
939
  const overallSpeedMultiplier = calculateSpeedMultiplierFromMods((_a = options.mods) !== null && _a !== void 0 ? _a : []) *
927
940
  ((_b = options.customSpeedMultiplier) !== null && _b !== void 0 ? _b : 1);
928
941
  const difficulty = new BeatmapDifficulty();
929
942
  difficulty.cs = (_c = options.circleSize) !== null && _c !== void 0 ? _c : difficulty.cs;
930
- difficulty.ar = (_e = (_d = options.approachRate) !== null && _d !== void 0 ? _d : difficulty.ar) !== null && _e !== void 0 ? _e : difficulty.od;
931
- difficulty.od = (_f = options.overallDifficulty) !== null && _f !== void 0 ? _f : difficulty.od;
932
- difficulty.hp = (_g = options.healthDrain) !== null && _g !== void 0 ? _g : difficulty.hp;
933
- const difficultyAdjustMod = (_h = options.mods) === null || _h === void 0 ? void 0 : _h.find((mod) => mod instanceof ModDifficultyAdjust);
934
- (_j = options.mods) === null || _j === void 0 ? void 0 : _j.forEach((mod) => {
943
+ difficulty.ar = (_d = options.approachRate) !== null && _d !== void 0 ? _d : difficulty.ar;
944
+ difficulty.od = (_e = options.overallDifficulty) !== null && _e !== void 0 ? _e : difficulty.od;
945
+ difficulty.hp = (_f = options.healthDrain) !== null && _f !== void 0 ? _f : difficulty.hp;
946
+ const difficultyAdjustMod = (_g = options.mods) === null || _g === void 0 ? void 0 : _g.find((mod) => mod instanceof ModDifficultyAdjust);
947
+ (_h = options.mods) === null || _h === void 0 ? void 0 : _h.forEach((mod) => {
935
948
  if (mod.isApplicableToDifficulty()) {
936
949
  mod.applyToDifficulty(exports.Modes.osu, difficulty);
937
950
  }
938
951
  });
939
952
  // Special handling for difficulty adjust mod where difficulty statistics are forced.
940
953
  difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.applyToDifficulty(exports.Modes.osu, difficulty);
941
- (_k = options.mods) === null || _k === void 0 ? void 0 : _k.forEach((mod, _, arr) => {
954
+ (_j = options.mods) === null || _j === void 0 ? void 0 : _j.forEach((mod, _, arr) => {
942
955
  var _a;
943
956
  if (mod.isApplicableToDifficultyWithSettings()) {
944
957
  mod.applyToDifficultyWithSettings(exports.Modes.osu, difficulty, arr, (_a = options.customSpeedMultiplier) !== null && _a !== void 0 ? _a : 1);
@@ -1127,8 +1140,7 @@ class HitObject {
1127
1140
  * @param mode The gamemode to apply defaults for.
1128
1141
  */
1129
1142
  applyDefaults(controlPoints, difficulty, mode) {
1130
- var _a;
1131
- this.timePreempt = convertApproachRateToMilliseconds((_a = difficulty.ar) !== null && _a !== void 0 ? _a : difficulty.od);
1143
+ this.timePreempt = convertApproachRateToMilliseconds(difficulty.ar);
1132
1144
  // Preempt time can go below 450ms. Normally, this is achieved via the DT mod which uniformly speeds up all animations game wide regardless of AR.
1133
1145
  // This uniform speedup is hard to match 1:1, however we can at least make AR>10 (via mods) feel good by extending the upper linear function above.
1134
1146
  // Note that this doesn't exactly match the AR>10 visuals as they're classically known, but it feels good.
@@ -1139,8 +1151,7 @@ class HitObject {
1139
1151
  const cs = calculateDroidDifficultyStatistics({
1140
1152
  circleSize: difficulty.cs,
1141
1153
  }).circleSize;
1142
- this._scale =
1143
- CircleSizeCalculator.standardCSToStandardScale(cs);
1154
+ this._scale = CircleSizeCalculator.standardCSToStandardScale(cs, true);
1144
1155
  break;
1145
1156
  }
1146
1157
  case exports.Modes.osu:
@@ -5357,7 +5368,6 @@ class BeatmapDecoder extends Decoder {
5357
5368
  super(...arguments);
5358
5369
  this.finalResult = new Beatmap();
5359
5370
  this.decoders = {};
5360
- this.previousSection = BeatmapSection.general;
5361
5371
  }
5362
5372
  /**
5363
5373
  * @param str The string to decode.
@@ -5383,14 +5393,6 @@ class BeatmapDecoder extends Decoder {
5383
5393
  if (this.finalResult.formatVersion !== this.formatVersion) {
5384
5394
  this.finalResult.formatVersion = this.formatVersion;
5385
5395
  }
5386
- // We need to track the previous section in case AR isn't specified in the beatmap file.
5387
- if (this.previousSection !== this.section) {
5388
- if (this.previousSection === BeatmapSection.difficulty &&
5389
- this.finalResult.difficulty.ar === undefined) {
5390
- this.finalResult.difficulty.ar = this.finalResult.difficulty.od;
5391
- }
5392
- this.previousSection = this.section;
5393
- }
5394
5396
  super.decodeLine(line);
5395
5397
  }
5396
5398
  reset() {
@@ -5645,7 +5647,6 @@ class BeatmapControlPointsEncoder extends BeatmapBaseEncoder {
5645
5647
  */
5646
5648
  class BeatmapDifficultyEncoder extends BeatmapBaseEncoder {
5647
5649
  encodeInternal() {
5648
- var _a;
5649
5650
  if (this.encodeSections) {
5650
5651
  this.writeLine("[Difficulty]");
5651
5652
  }
@@ -5653,7 +5654,7 @@ class BeatmapDifficultyEncoder extends BeatmapBaseEncoder {
5653
5654
  this.writeLine(`HPDrainRate: ${difficulty.hp}`);
5654
5655
  this.writeLine(`CircleSize: ${difficulty.cs}`);
5655
5656
  this.writeLine(`OverallDifficulty: ${difficulty.od}`);
5656
- this.writeLine(`ApproachRate: ${(_a = difficulty.ar) !== null && _a !== void 0 ? _a : difficulty.od}`);
5657
+ this.writeLine(`ApproachRate: ${difficulty.ar}`);
5657
5658
  this.writeLine(`SliderMultiplier: ${difficulty.sliderMultiplier}`);
5658
5659
  this.writeLine(`SliderTickRate: ${difficulty.sliderTickRate}`);
5659
5660
  }
@@ -7389,22 +7390,34 @@ ErrorFunction.ervInvImpGd = [
7389
7390
  ];
7390
7391
 
7391
7392
  /**
7392
- * Holds interpolation methods for numbers.
7393
+ * Holds interpolation methods for numbers and vectors.
7393
7394
  */
7394
7395
  class Interpolation {
7395
- /**
7396
- * Performs a linear interpolation.
7397
- *
7398
- * @param start The starting point of the interpolation.
7399
- * @param final The final point of the interpolation.
7400
- * @param amount The interpolation multiplier.
7401
- * @returns The interpolated value.
7402
- */
7403
7396
  static lerp(start, final, amount) {
7404
- return start + (final - start) * amount;
7397
+ if (start instanceof Vector2 && final instanceof Vector2) {
7398
+ return new Vector2(this.lerp(start.x, final.x, amount), this.lerp(start.y, final.y, amount));
7399
+ }
7400
+ else {
7401
+ return (start +
7402
+ (final - start) * amount);
7403
+ }
7405
7404
  }
7406
7405
  }
7407
7406
 
7407
+ /**
7408
+ * Ranking status of a beatmap.
7409
+ */
7410
+ exports.RankedStatus = void 0;
7411
+ (function (RankedStatus) {
7412
+ RankedStatus[RankedStatus["graveyard"] = -2] = "graveyard";
7413
+ RankedStatus[RankedStatus["wip"] = -1] = "wip";
7414
+ RankedStatus[RankedStatus["pending"] = 0] = "pending";
7415
+ RankedStatus[RankedStatus["ranked"] = 1] = "ranked";
7416
+ RankedStatus[RankedStatus["approved"] = 2] = "approved";
7417
+ RankedStatus[RankedStatus["qualified"] = 3] = "qualified";
7418
+ RankedStatus[RankedStatus["loved"] = 4] = "loved";
7419
+ })(exports.RankedStatus || (exports.RankedStatus = {}));
7420
+
7408
7421
  /**
7409
7422
  * An API request builder for osu!standard.
7410
7423
  */
@@ -7449,7 +7462,7 @@ class MapInfo {
7449
7462
  /**
7450
7463
  * The ranking status of the beatmap.
7451
7464
  */
7452
- this.approved = 0;
7465
+ this.approved = exports.RankedStatus.pending;
7453
7466
  /**
7454
7467
  * The ID of the beatmap.
7455
7468
  */
@@ -7521,7 +7534,7 @@ class MapInfo {
7521
7534
  /**
7522
7535
  * The maximum combo of the beatmap.
7523
7536
  */
7524
- this.maxCombo = 0;
7537
+ this.maxCombo = null;
7525
7538
  /**
7526
7539
  * The circle size of the beatmap.
7527
7540
  */
@@ -7677,7 +7690,8 @@ class MapInfo {
7677
7690
  map.spinners = mapinfo.count_spinner
7678
7691
  ? parseInt(mapinfo.count_spinner)
7679
7692
  : 0;
7680
- map.maxCombo = parseInt(mapinfo.max_combo);
7693
+ map.maxCombo =
7694
+ mapinfo.max_combo !== null ? parseInt(mapinfo.max_combo) : null;
7681
7695
  map.cs = parseFloat(mapinfo.diff_size);
7682
7696
  map.ar = parseFloat(mapinfo.diff_approach);
7683
7697
  map.od = parseFloat(mapinfo.diff_overall);
@@ -7708,7 +7722,7 @@ class MapInfo {
7708
7722
  * @returns The raw API response represented by this `MapInfo`.
7709
7723
  */
7710
7724
  toAPIResponse() {
7711
- var _a, _b, _c, _d, _e, _f;
7725
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7712
7726
  const padDateNumber = (num) => num.toString().padStart(2, "0");
7713
7727
  const convertDate = (date) => `${date.getUTCFullYear()}-${padDateNumber(date.getUTCMonth() + 1)}-${padDateNumber(date.getUTCDate())} ${padDateNumber(date.getUTCHours())}:${padDateNumber(date.getUTCMinutes())}:${padDateNumber(date.getUTCSeconds())}`;
7714
7728
  return {
@@ -7749,7 +7763,7 @@ class MapInfo {
7749
7763
  count_normal: this.circles.toString(),
7750
7764
  count_slider: this.sliders.toString(),
7751
7765
  count_spinner: this.spinners.toString(),
7752
- max_combo: this.maxCombo.toString(),
7766
+ max_combo: (_h = (_g = this.maxCombo) === null || _g === void 0 ? void 0 : _g.toString()) !== null && _h !== void 0 ? _h : null,
7753
7767
  storyboard: this.storyboardAvailable ? "1" : "0",
7754
7768
  video: this.videoAvailable ? "1" : "0",
7755
7769
  download_unavailable: this.downloadAvailable ? "0" : "1",
@@ -7859,9 +7873,7 @@ class ModEasy extends Mod {
7859
7873
  case exports.Modes.osu:
7860
7874
  difficulty.cs /= 2;
7861
7875
  }
7862
- if (difficulty.ar !== undefined) {
7863
- difficulty.ar /= 2;
7864
- }
7876
+ difficulty.ar /= 2;
7865
7877
  difficulty.od /= 2;
7866
7878
  difficulty.hp /= 2;
7867
7879
  }
@@ -7913,9 +7925,7 @@ class ModHardRock extends Mod {
7913
7925
  difficulty.cs = this.applySetting(difficulty.cs, 1.3);
7914
7926
  break;
7915
7927
  }
7916
- if (difficulty.ar !== undefined) {
7917
- difficulty.ar = this.applySetting(difficulty.ar);
7918
- }
7928
+ difficulty.ar = this.applySetting(difficulty.ar);
7919
7929
  difficulty.od = this.applySetting(difficulty.od);
7920
7930
  difficulty.hp = this.applySetting(difficulty.hp);
7921
7931
  }
@@ -8008,8 +8018,7 @@ class ModReallyEasy extends Mod {
8008
8018
  return;
8009
8019
  }
8010
8020
  const difficultyAdjustMod = mods.find((m) => m instanceof ModDifficultyAdjust);
8011
- if ((difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.ar) === undefined &&
8012
- difficulty.ar !== undefined) {
8021
+ if ((difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.ar) === undefined) {
8013
8022
  if (mods.some((m) => m instanceof ModEasy)) {
8014
8023
  difficulty.ar *= 2;
8015
8024
  difficulty.ar -= 0.5;
@@ -8357,20 +8366,6 @@ class Playfield {
8357
8366
  */
8358
8367
  Playfield.baseSize = new Vector2(512, 384);
8359
8368
 
8360
- /**
8361
- * Ranking status of a beatmap.
8362
- */
8363
- exports.RankedStatus = void 0;
8364
- (function (RankedStatus) {
8365
- RankedStatus[RankedStatus["graveyard"] = -2] = "graveyard";
8366
- RankedStatus[RankedStatus["wip"] = -1] = "wip";
8367
- RankedStatus[RankedStatus["pending"] = 0] = "pending";
8368
- RankedStatus[RankedStatus["ranked"] = 1] = "ranked";
8369
- RankedStatus[RankedStatus["approved"] = 2] = "approved";
8370
- RankedStatus[RankedStatus["qualified"] = 3] = "qualified";
8371
- RankedStatus[RankedStatus["loved"] = 4] = "loved";
8372
- })(exports.RankedStatus || (exports.RankedStatus = {}));
8373
-
8374
8369
  dotenv.config();
8375
8370
 
8376
8371
  exports.AR0_MS = AR0_MS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-base",
3
- "version": "4.0.0-beta.19",
3
+ "version": "4.0.0-beta.24",
4
4
  "description": "Base module for all osu! related modules.",
5
5
  "keywords": [
6
6
  "osu",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "45f7c976ba683027dc3a4d29de8bf289aadf7707"
45
+ "gitHead": "b567d54f6f8553aeaf56acb8a0b3741c3920b72b"
46
46
  }
@@ -158,7 +158,15 @@ declare class BeatmapDifficulty {
158
158
  /**
159
159
  * The approach rate of the beatmap.
160
160
  */
161
- ar?: number;
161
+ private _ar?;
162
+ /**
163
+ * The approach rate of the beatmap.
164
+ */
165
+ get ar(): number;
166
+ /**
167
+ * The approach rate of the beatmap.
168
+ */
169
+ set ar(value: number);
162
170
  /**
163
171
  * The circle size of the beatmap.
164
172
  */
@@ -1970,7 +1978,6 @@ declare abstract class Decoder<R, D extends SectionDecoder<R>> {
1970
1978
  declare class BeatmapDecoder extends Decoder<Beatmap, SectionDecoder<Beatmap>> {
1971
1979
  protected finalResult: Beatmap;
1972
1980
  protected decoders: Partial<Record<BeatmapSection, SectionDecoder<Beatmap>>>;
1973
- private previousSection;
1974
1981
  /**
1975
1982
  * @param str The string to decode.
1976
1983
  * @param mode The mode to parse the beatmap as. Defaults to osu!standard.
@@ -3338,11 +3345,11 @@ declare enum HitSoundType {
3338
3345
  type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
3339
3346
 
3340
3347
  /**
3341
- * Holds interpolation methods for numbers.
3348
+ * Holds interpolation methods for numbers and vectors.
3342
3349
  */
3343
3350
  declare abstract class Interpolation {
3344
3351
  /**
3345
- * Performs a linear interpolation.
3352
+ * Performs a linear interpolation of numbers.
3346
3353
  *
3347
3354
  * @param start The starting point of the interpolation.
3348
3355
  * @param final The final point of the interpolation.
@@ -3350,6 +3357,15 @@ declare abstract class Interpolation {
3350
3357
  * @returns The interpolated value.
3351
3358
  */
3352
3359
  static lerp(start: number, final: number, amount: number): number;
3360
+ /**
3361
+ * Performs a linear interpolation of vectors.
3362
+ *
3363
+ * @param start The starting point of the interpolation.
3364
+ * @param final The final point of the interpolation.
3365
+ * @param amount The interpolation multiplier.
3366
+ * @returns The interpolated vector.
3367
+ */
3368
+ static lerp(start: Vector2, final: Vector2, amount: number): Vector2;
3353
3369
  }
3354
3370
 
3355
3371
  /**
@@ -3400,7 +3416,7 @@ interface OsuAPIResponse {
3400
3416
  readonly count_normal: string;
3401
3417
  readonly count_slider: string;
3402
3418
  readonly count_spinner: string;
3403
- readonly max_combo: string;
3419
+ readonly max_combo: string | null;
3404
3420
  readonly storyboard: string;
3405
3421
  readonly video: string;
3406
3422
  readonly download_unavailable: string;
@@ -3410,7 +3426,7 @@ interface OsuAPIResponse {
3410
3426
  /**
3411
3427
  * Represents a beatmap with general information.
3412
3428
  */
3413
- declare class MapInfo<HasBeatmap extends boolean = boolean> {
3429
+ declare class MapInfo<THasBeatmap extends boolean = boolean> {
3414
3430
  /**
3415
3431
  * The title of the song of the beatmap.
3416
3432
  */
@@ -3518,7 +3534,7 @@ declare class MapInfo<HasBeatmap extends boolean = boolean> {
3518
3534
  /**
3519
3535
  * The maximum combo of the beatmap.
3520
3536
  */
3521
- maxCombo: number;
3537
+ maxCombo: number | null;
3522
3538
  /**
3523
3539
  * The circle size of the beatmap.
3524
3540
  */
@@ -3582,7 +3598,7 @@ declare class MapInfo<HasBeatmap extends boolean = boolean> {
3582
3598
  /**
3583
3599
  * The decoded beatmap from beatmap decoder.
3584
3600
  */
3585
- get beatmap(): If<HasBeatmap, Beatmap>;
3601
+ get beatmap(): If<THasBeatmap, Beatmap>;
3586
3602
  /**
3587
3603
  * The osu! site link to this beatmap.
3588
3604
  */
@@ -4268,7 +4284,7 @@ declare abstract class Polynomial {
4268
4284
  * Precision utilities.
4269
4285
  */
4270
4286
  declare abstract class Precision {
4271
- static readonly FLOAT_EPSILON: number;
4287
+ static readonly FLOAT_EPSILON = 0.001;
4272
4288
  /**
4273
4289
  * Checks if two numbers are equal with a given tolerance.
4274
4290
  *