mirror of
https://github.com/penpot/penpot.git
synced 2026-09-06 12:09:24 +00:00
⚡ Avoid unnecesary call on math helper
This commit is contained in:
parent
a15a2010b6
commit
8d46271e9d
@ -192,7 +192,7 @@
|
|||||||
(defn round-to-zero
|
(defn round-to-zero
|
||||||
"Given a number if it's close enough to zero round to the zero to avoid precision problems"
|
"Given a number if it's close enough to zero round to the zero to avoid precision problems"
|
||||||
[num]
|
[num]
|
||||||
(if (almost-zero? num)
|
(if (< (abs num) 1e-4)
|
||||||
0
|
0
|
||||||
num))
|
num))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user