Ver Fonte

tweak, use Box3D.size

Alexander Rose há 5 anos atrás
pai
commit
8b766dc242
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/mol-math/geometry/lookup3d/grid.ts

+ 1 - 1
src/mol-math/geometry/lookup3d/grid.ts

@@ -192,7 +192,7 @@ function build(data: PositionData, cellSizeOrCount?: Vec3 | number) {
     const expandedBox = Box3D.expand(Box3D.empty(), boundingBox, Vec3.create(0.5, 0.5, 0.5));
     const { indices } = data;
 
-    const S = Vec3.sub(Vec3.zero(), expandedBox.max, expandedBox.min);
+    const S = Box3D.size(Vec3.zero(), expandedBox);
     let delta, size;
 
     const elementCount = OrderedSet.size(indices);