From 5937c7d14f1f36473c8cdf6717cfc7b3a9858b6f Mon Sep 17 00:00:00 2001 From: arne Date: Sat, 21 Feb 2026 09:15:57 +0100 Subject: [PATCH] Fix bug in grid alignment of fourty-one --- src/aphorisms/fourty_one.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aphorisms/fourty_one.clj b/src/aphorisms/fourty_one.clj index 4dc910c..defac0e 100644 --- a/src/aphorisms/fourty_one.clj +++ b/src/aphorisms/fourty_one.clj @@ -30,8 +30,8 @@ (defn as-grid [rect cell-size] (let [n-x (int (/ (g/width rect) cell-size)) n-y (int (/ (g/height rect) cell-size)) - t (v/vec2 (* (mod (g/width rect) n-x) 0.5) - (* (mod (g/height rect) n-x) 0.5))] + t (v/vec2 (* (mod (g/width rect) (* cell-size n-x)) 0.5) + (* (mod (g/height rect) (* cell-size n-x)) 0.5))] (for [x (range n-x) y (range n-y)] (-> (r/rect (* x cell-size) (* y cell-size) cell-size)