Fix bad tagging
This commit is contained in:
parent
2fc6e91ee2
commit
0739abbaf2
2
index.js
2
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);
|
||||
|
Loading…
Reference in New Issue
Block a user