From 949ee1b382894754ed3d9b05aa2286e2fd07fda6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 18 May 2023 13:58:02 +0200 Subject: [PATCH] fixed bucketer --- hyperpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index a432cf26..cc0f500d 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -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) {