Answers for "get coordinates from number in grid"

1

get coordinates from number in grid

number:
n = 15
rows:
yn = 4
lines:
yx = 5

x = n modulo yn
y = (n - x) / yn
Posted by: Guest on September-26-2020
1

get coordinates from number in grid

number:
n = 15
rows:
yn = 4
lines:
yx = 5

x = n modulo yn
y = (n - x) / yn
Posted by: Guest on September-26-2020

Code answers related to "get coordinates from number in grid"

Browse Popular Code Answers by Language