Permalink
Browse files

Fixed BoundingSphere tests

  • Loading branch information...
1 parent 46754c4 commit 9c07594521b7b1ff23042912bb64de4aeadc196c @pjcozzi pjcozzi committed Mar 8, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Core/BoundingSphere.js
@@ -509,8 +509,9 @@ define([
result = new BoundingSphere();
}
- Cartesian3.add(corner, oppositeCorner, result.center);
- Cartesian3.multiplyByScalar(result.center, 0.5, result.center);
+ var center = result.center;
+ Cartesian3.add(corner, oppositeCorner, center);
+ Cartesian3.multiplyByScalar(center, 0.5, center);
result.radius = Cartesian3.distance(center, oppositeCorner);
return result;
};

0 comments on commit 9c07594

Please sign in to comment.