Terrain performance
This commit is contained in:
1 parent
9b9bbc70e8
commit
953a02e3f5
5 files changed
+46
-29
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user