From 8d46271e9dc1cacc6eb7fd67bbb610560ff9942d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 20 Jun 2023 11:46:06 +0200 Subject: [PATCH] :zap: Avoid unnecesary call on math helper --- common/src/app/common/math.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/app/common/math.cljc b/common/src/app/common/math.cljc index 3d41530ac3..688872c16a 100644 --- a/common/src/app/common/math.cljc +++ b/common/src/app/common/math.cljc @@ -192,7 +192,7 @@ (defn round-to-zero "Given a number if it's close enough to zero round to the zero to avoid precision problems" [num] - (if (almost-zero? num) + (if (< (abs num) 1e-4) 0 num))