Browse Source

fix boundary-helper regression

Alexander Rose 2 years ago
parent
commit
e9c36c2375
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/mol-math/geometry/boundary-helper.ts

+ 2 - 1
src/mol-math/geometry/boundary-helper.ts

@@ -13,6 +13,7 @@ import { Box3D } from './primitives/box3d';
 const v3dot = Vec3.dot;
 const v3copy = Vec3.copy;
 const v3scaleAndSub = Vec3.scaleAndSub;
+const v3scaleAndAdd = Vec3.scaleAndAdd;
 
 // implementing http://www.ep.liu.se/ecp/034/009/ecp083409.pdf
 
@@ -48,7 +49,7 @@ export class BoundaryHelper {
         }
         if (d + radius > this.maxDist[i]) {
             this.maxDist[i] = d + radius;
-            v3scaleAndSub(this.extrema[i * 2 + 1], center, di, radius);
+            v3scaleAndAdd(this.extrema[i * 2 + 1], center, di, radius);
         }
     }