Skip to content

Commit 210329a

Browse files
authored
Fix grid indices
Uncovered this bug when testing new support for non-square sizes.
1 parent dd6e851 commit 210329a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythreejs/pythreejs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def grid_indices_gen(nx, ny):
4444
"""
4545
for x in range(nx - 1):
4646
for y in range(ny - 1):
47-
root = x + y * ny
47+
root = x + y * nx
4848
yield (root, root + 1, root + nx)
4949
yield (root + nx, root + 1, root + nx + 1)
5050

0 commit comments

Comments
 (0)