Skip to content

Commit

Permalink
remove redundant nested calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Nov 29, 2024
1 parent b0ba200 commit e654b6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/shimmers/sketches/circle_packing.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
(let [growth (assoc (g/scale-size circle scale) :color (:color circle))
near (saq/closest-circle (g/delete-point tree (:p circle)) growth)]
(if (and (geometry/contains-circle? boundary growth)
(and near (> (saq/circle-overlap growth near) 0)))
near
(> (saq/circle-overlap growth near) 0))
(recur (pack/replace-circle-at tree growth)
remaining
(conj result growth))
Expand Down
2 changes: 1 addition & 1 deletion src/shimmers/sketches/display_tree.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
(q/fill 0.0)
(cq/circle center 10.0)
(q/fill (- 1.0 fade))
(let [s (str i "\n" (int x) "," (int y) "\n" (str (:info screen)))]
(let [s (str i "\n" (int x) "," (int y) "\n" (:info screen))]
(q/with-translation [x y]
(q/with-rotation [rotation]
(q/text s 0 0)))))))
Expand Down

0 comments on commit e654b6d

Please sign in to comment.