🐛 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? (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"