You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the JavaScript version to do some map generation, and I noticed that it doesn't handle negative coordinates well. Is this intended?
I've just offset my coordinates by a large number to avoid this problem, but I wanted to check.
Also while I was poking around I noticed this function:
function tile(coordinate, period) {
if (coordinate < 0) while (coordinate < 0)
coordinate += period;
else
return coordinate % period;
}
I'm fairly sure that the else should be removed, right? Otherwise this just returns undefined for a negative coordinate. I was still unable to get satisfactory results from making that change though, so maybe the algorithm just isn't meant for negative numbers?
The text was updated successfully, but these errors were encountered:
I've been using the JavaScript version to do some map generation, and I noticed that it doesn't handle negative coordinates well. Is this intended?
I've just offset my coordinates by a large number to avoid this problem, but I wanted to check.
Also while I was poking around I noticed this function:
I'm fairly sure that the else should be removed, right? Otherwise this just returns undefined for a negative coordinate. I was still unable to get satisfactory results from making that change though, so maybe the algorithm just isn't meant for negative numbers?
The text was updated successfully, but these errors were encountered: