diff --git a/common/src/app/common/geom/rect.cljc b/common/src/app/common/geom/rect.cljc index b7d14d5426..925c784e65 100644 --- a/common/src/app/common/geom/rect.cljc +++ b/common/src/app/common/geom/rect.cljc @@ -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))))))) diff --git a/common/test/common_tests/geom_shapes_test.cljc b/common/test/common_tests/geom_shapes_test.cljc index 3164e37d41..29401412ec 100644 --- a/common/test/common_tests/geom_shapes_test.cljc +++ b/common/test/common_tests/geom_shapes_test.cljc @@ -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)))