mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 06:05:44 +01:00
improve coordinate conversion documentation, since our division was incorrect.
This commit is contained in:
@@ -39,13 +39,8 @@ Where \*.mca files are the newer variant.
|
||||
|
||||
### coordinate conversions
|
||||
```c
|
||||
// block->chunk:
|
||||
return (x / 16) - sgn(x);
|
||||
return (x >> 4) - (x & 0x80000000);
|
||||
|
||||
// chunk->region:
|
||||
return (x / 32) - sgn(x);
|
||||
return (x >> 5) - (x & 0x80000000);
|
||||
return (x >> 4); // block->chunk
|
||||
return (x >> 5); // chunk->region
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user