Template:Fragoria Map
From FragoriaWiki
(Difference between revisions)
Line 103: | Line 103: | ||
// repeat across y-axis (vertically) | // repeat across y-axis (vertically) | ||
if (y < 0 || y >= tileRange) { | if (y < 0 || y >= tileRange) { | ||
+ | // y = (y % tileRange + tileRange) % tileRange; | ||
return null; | return null; | ||
} | } | ||
Line 108: | Line 109: | ||
// repeat across x-axis | // repeat across x-axis | ||
if (x < 0 || x >= tileRange) { | if (x < 0 || x >= tileRange) { | ||
- | + | x = (x % tileRange + tileRange) % tileRange; | |
- | + | // return null; | |
} | } | ||
Revision as of 04:36, 5 April 2015
Coordinates