1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 03:09:59 +00:00

fixed bucketer

This commit is contained in:
Zeno Rogue 2023-05-18 13:58:02 +02:00
parent 2d74cfe6c4
commit 949ee1b382

View File

@ -1692,7 +1692,7 @@ EX ld raddif(ld a, ld b) {
EX int bucket_scale = 10000;
EX unsigned bucketer(ld x) {
return (unsigned) (long long) (floor(x * bucket_scale));
return (unsigned) (long long) (floor(x * bucket_scale + .5));
}
EX unsigned bucketer(hyperpoint h) {