mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 09:11:42 +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?
|
(defn zero?
|
||||||
[p]
|
[p]
|
||||||
(and ^boolean (= 0 (dm/get-prop p :x))
|
(let [x (dm/get-prop p :x)
|
||||||
^boolean (= 0 (dm/get-prop p :y))))
|
y (dm/get-prop p :y)]
|
||||||
|
(and ^boolean (== 0 x)
|
||||||
|
^boolean (== 0 y))))
|
||||||
|
|
||||||
(defn lerp
|
(defn lerp
|
||||||
"Calculates a linear interpolation between two points given a tvalue"
|
"Calculates a linear interpolation between two points given a tvalue"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue