1 parent f8cb628 commit e978408Copy full SHA for e978408
2 files changed
src/shimmers/sketches/minimum_spanning_tree.cljs
@@ -46,7 +46,7 @@
46
(cq/circle (cq/rel-pos pt) 0.2))
47
(q/stroke-weight 0.5)
48
(q/stroke 50 50 230)
49
- (doseq [[i [p q]] (map-indexed vector (take (math/floor (inc step)) edges))
+ (doseq [[i [p q]] (map-indexed vector (take (int (math/floor (inc step))) edges))
50
:let [wp (cq/rel-vec p)
51
wq (cq/rel-vec q)]]
52
(if (< i (math/floor step))
src/shimmers/sketches/space_colonization.cljs
@@ -72,7 +72,7 @@
72
[{:keys [attractor-power snap-theta] :as settings}]
73
(let [bounds (cq/screen-rect)
74
attractors
75
- (repeatedly (math/pow 2 attractor-power)
+ (repeatedly (int (math/pow 2 attractor-power))
76
(attractor-gen bounds (rand-nth [:triangle :square :circle])))
77
roots (dr/weighted {1 4
78
2 2
0 commit comments