Fix bug in grid alignment of fourty-one
This commit is contained in:
parent
0075c83b5e
commit
5937c7d14f
1 changed files with 2 additions and 2 deletions
|
|
@ -30,8 +30,8 @@
|
||||||
(defn as-grid [rect cell-size]
|
(defn as-grid [rect cell-size]
|
||||||
(let [n-x (int (/ (g/width rect) cell-size))
|
(let [n-x (int (/ (g/width rect) cell-size))
|
||||||
n-y (int (/ (g/height rect) cell-size))
|
n-y (int (/ (g/height rect) cell-size))
|
||||||
t (v/vec2 (* (mod (g/width rect) n-x) 0.5)
|
t (v/vec2 (* (mod (g/width rect) (* cell-size n-x)) 0.5)
|
||||||
(* (mod (g/height rect) n-x) 0.5))]
|
(* (mod (g/height rect) (* cell-size n-x)) 0.5))]
|
||||||
(for [x (range n-x)
|
(for [x (range n-x)
|
||||||
y (range n-y)]
|
y (range n-y)]
|
||||||
(-> (r/rect (* x cell-size) (* y cell-size) cell-size)
|
(-> (r/rect (* x cell-size) (* y cell-size) cell-size)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue