aboutsummaryrefslogtreecommitdiff
path: root/src/utils/numberUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/numberUtils.js')
-rw-r--r--src/utils/numberUtils.js3
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