From 0739abbaf2154ae584861c22a15512176d700e8d Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Fri, 17 Dec 2021 15:27:32 -0800 Subject: [PATCH] Fix bad tagging --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 551bdd4..fe2e14f 100644 --- a/index.js +++ b/index.js @@ -325,7 +325,7 @@ function rayThroughGrid(origin, direction, maxDistance) { const nextGrid = range(3).map(i => direction[i] > 0 ? Math.floor(origin[i] + 0.5) + 0.5 : - Math.floor(origin[i] + 0.5) - 0.5); + Math.floor(origin[i] + 0.499) - 0.5); const distanceToGrid = range(3).map(i => (nextGrid[i] - origin[i]) / direction[i]) .map(v => v === 0.0 ? Number.POSITIVE_INFINITY : v); const axis = minIndex(distanceToGrid);