Explorar el Código

tweak, use Box3D.size

Alexander Rose hace 5 años
padre
commit
8b766dc242
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);