🐛 Fix geom/point zero? predicate to work correctly with mixed numeric types

Using numeric indpendent equality check: `==`
This commit is contained in:
Andrey Antukh 2025-04-17 14:37:58 +02:00
parent c6f68e6ed1
commit 500c27859b

View file

@ -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"