Skip to content

Commit d2399c7

Browse files
committed
Box3: Reuse Sphere.center in getBoundingSphere(). See 5578c05
1 parent 4baf3e5 commit d2399c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/math/Box3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ Box3.prototype = {
394394

395395
var result = optionalTarget || new Sphere();
396396

397-
result.center = this.getCenter();
397+
this.getCenter( result.center );
398+
398399
result.radius = this.size( v1 ).length() * 0.5;
399400

400401
return result;

0 commit comments

Comments
 (0)