mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-04 13:19:20 +00:00
added bucket_scale to fix bucketing problems
This commit is contained in:
parent
a70e799081
commit
fd3cc72508
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user