mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 12:21:39 +02:00
🐛 Fix geom/point zero? predicate to work correctly with mixed numeric types
Using numeric indpendent equality check: `==`
This commit is contained in:
parent
c6f68e6ed1
commit
500c27859b
1 changed files with 4 additions and 2 deletions
|
@ -472,8 +472,10 @@
|
|||
|
||||
(defn zero?
|
||||
[p]
|
||||
(and ^boolean (= 0 (dm/get-prop p :x))
|
||||
^boolean (= 0 (dm/get-prop p :y))))
|
||||
(let [x (dm/get-prop p :x)
|
||||
y (dm/get-prop p :y)]
|
||||
(and ^boolean (== 0 x)
|
||||
^boolean (== 0 y))))
|
||||
|
||||
(defn lerp
|
||||
"Calculates a linear interpolation between two points given a tvalue"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue