constrain bucket max index froms scale point
This commit is contained in:
parent
8e731a01ef
commit
16c059288e
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@
|
||||||
let zm = Math.min(p1.z, p2.z, p3.z) - zMin,
|
let zm = Math.min(p1.z, p2.z, p3.z) - zMin,
|
||||||
zM = Math.max(p1.z, p2.z, p3.z) - zMin,
|
zM = Math.max(p1.z, p2.z, p3.z) - zMin,
|
||||||
bm = Math.floor(zm * zScale),
|
bm = Math.floor(zm * zScale),
|
||||||
bM = Math.ceil(zM * zScale);
|
bM = Math.min(Math.ceil(zM * zScale), bucketCount);
|
||||||
// add point to all buckets in range
|
// add point to all buckets in range
|
||||||
for (j = bm; j < bM; j++) {
|
for (j = bm; j < bM; j++) {
|
||||||
bucket = buckets[j].points;
|
bucket = buckets[j].points;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue