diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-20 14:23:35 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-20 14:23:35 +0800 |
| commit | e08e61e420b520c0442d4302a5db5e9d6f8e9356 (patch) | |
| tree | 61d14f8336372832184709f6315ece6197844e4b /src/utils | |
| parent | 627cddaf0aaf22058fd9788870a1b5a63502aeff (diff) | |
| download | SoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.tar.gz SoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.tar.bz2 SoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.zip | |
potion time left
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/numberUtils.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/numberUtils.js b/src/utils/numberUtils.js index 8d5e7c3..60a4592 100644 --- a/src/utils/numberUtils.js +++ b/src/utils/numberUtils.js @@ -97,6 +97,9 @@ let utils = { if (hours === 0) return mins + "m" return `${hours}h ${mins}m` + }, + basiclyEqual: (num1, num2, dist = 0.01) => { + return Math.abs(num1 - num2) < dist } } module.exports = utils |
