diff --git a/common/src/app/common/geom/modifiers.cljc b/common/src/app/common/geom/modifiers.cljc index 01ade1dd61..01529c946f 100644 --- a/common/src/app/common/geom/modifiers.cljc +++ b/common/src/app/common/geom/modifiers.cljc @@ -96,10 +96,9 @@ (if (and (some? layout-line) (<= from-idx max-idx)) (let [to-idx (+ from-idx (:num-children layout-line)) children (subvec children from-idx to-idx) - [_ modif-tree] (reduce set-child-modifiers [layout-line modif-tree] children)] - (recur modif-tree (first pending) (rest pending) (long to-idx))) + (recur modif-tree (first pending) (rest pending) to-idx)) modif-tree))))) diff --git a/common/src/app/common/geom/shapes/flex_layout/drop_area.cljc b/common/src/app/common/geom/shapes/flex_layout/drop_area.cljc index 9bb428c2b1..e9a5fa4915 100644 --- a/common/src/app/common/geom/shapes/flex_layout/drop_area.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/drop_area.cljc @@ -177,7 +177,7 @@ (rest children)))))] (recur next-areas - (+ from-idx (long (:num-children current-line))) + (+ from-idx (:num-children current-line)) (+ (:x line-area) (:width line-area)) (+ (:y line-area) (:height line-area)) (rest lines))))))) diff --git a/common/src/app/common/types/path/helpers.cljc b/common/src/app/common/types/path/helpers.cljc index e7ef6c6336..483fa60215 100644 --- a/common/src/app/common/types/path/helpers.cljc +++ b/common/src/app/common/types/path/helpers.cljc @@ -393,17 +393,15 @@ defined by the constant num-segments" [start end h1 h2] (let [offset (/ 1 num-segments) - tp (fn [t] (curve-values start end h1 h2 t))] - (loop [from 0 + tp (fn [t] (curve-values start end h1 h2 t))] + (loop [from 0.0 result []] - - (let [to (min 1 (+ from offset)) - line [(tp from) (tp to)] + (let [to (mth/min 1.0 (+ from offset)) + line [(tp from) (tp to)] result (conj result line)] - - (if (>= to 1) + (if (>= to 1.0) result - (recur (long to) result)))))) + (recur (double to) result)))))) (defn curve-split "Splits a curve into two at the given parametric value `t`. diff --git a/common/src/app/common/types/path/subpath.cljc b/common/src/app/common/types/path/subpath.cljc index 6082117cae..b7f13a0aea 100644 --- a/common/src/app/common/types/path/subpath.cljc +++ b/common/src/app/common/types/path/subpath.cljc @@ -190,4 +190,4 @@ (recur (first subpath) (rest subpath) first-point - (long signed-area))))))) + signed-area))))))