added bucket_scale to fix bucketing problems

This commit is contained in:
Zeno Rogue 2023-05-15 02:31:25 +02:00
parent a70e799081
commit fd3cc72508
1 changed files with 3 additions and 1 deletions

View File

@ -1689,8 +1689,10 @@ EX ld raddif(ld a, ld b) {
return d;
}
EX int bucket_scale = 10000;
EX unsigned bucketer(ld x) {
return unsigned((long long)(x * 10000 + 100000.5) - 100000);
return (unsigned) (long long) (floor(x * bucket_scale));
}
EX unsigned bucketer(hyperpoint h) {