From e08e61e420b520c0442d4302a5db5e9d6f8e9356 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 20 Sep 2022 14:23:35 +0800 Subject: potion time left --- src/utils/numberUtils.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils') 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 -- cgit