mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00: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
@ -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…
x
Reference in New Issue
Block a user