Remove reflection on geom rect code

This commit is contained in:
Andrey Antukh
2025-08-14 09:06:18 +02:00
parent e336f287b6
commit 77be00014e
2 changed files with 5 additions and 5 deletions

View File

@@ -255,10 +255,10 @@
(if-let [pt (first pts)]
(let [x (dm/get-prop pt :x)
y (dm/get-prop pt :y)]
(recur (mth/min minx x)
(mth/min miny y)
(mth/max maxx x)
(mth/max maxy y)
(recur (double (mth/min minx x))
(double (mth/min miny y))
(double (mth/max maxx x))
(double (mth/max maxy y))
(rest pts)))
(when (d/num? minx miny maxx maxy)
(make-rect minx miny (- maxx minx) (- maxy miny)))))))

View File

@@ -168,7 +168,7 @@
(gpt/point 20 65.2)
(gpt/point 12 -10)]
result (grc/points->rect points)
expect {:x -1, :y -10, :width 21, :height 75.2}]
expect {:x -1.0, :y -10.0, :width 21.0, :height 75.2}]
(t/is (= (:x expect) (:x result)))
(t/is (= (:y expect) (:y result)))