From e9c36c237528b4e5c7a7825715aa00c83e74075b Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Thu, 19 Jan 2023 21:43:57 -0800
Subject: [PATCH] fix boundary-helper regression

---
 src/mol-math/geometry/boundary-helper.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mol-math/geometry/boundary-helper.ts b/src/mol-math/geometry/boundary-helper.ts
index 78322c504..924d14919 100644
--- a/src/mol-math/geometry/boundary-helper.ts
+++ b/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);
         }
     }
 
-- 
GitLab