Terrain performance

This commit is contained in:
zenoamaro committed 2019-06-26 21:05:18 +02:00
1 parent 9b9bbc70e8
commit 953a02e3f5
5 files changed
+46 -29

No files matched your search

+3 -3
View File
@@ -1,9 +1,9 @@
export function coords(width, i) {
return [i%width, Math.floor(i/width)];
export function index2coords(width, i) {
return [i % width, Math.floor(i/width)];
}
export function index(width, x, y) {
export function coords2index(width, x, y) {
return y * width + x;
}