Skip to content

Commit

Permalink
Changed bounds checking MIN_VALUE to -MAX_VALUE. Fixes #202
Browse files Browse the repository at this point in the history
WIP #202. Changing Number.MAX_VALUE to Infinity
  • Loading branch information
brollb committed Feb 4, 2016
1 parent 34fa27a commit dd5e260
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/geometry/Bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ module.exports = Bounds;
* @param {vector} velocity
*/
Bounds.update = function(bounds, vertices, velocity) {
bounds.min.x = Number.MAX_VALUE;
bounds.max.x = Number.MIN_VALUE;
bounds.min.y = Number.MAX_VALUE;
bounds.max.y = Number.MIN_VALUE;
bounds.min.x = Infinity;
bounds.max.x = -Infinity;
bounds.min.y = Infinity;
bounds.max.y = -Infinity;

for (var i = 0; i < vertices.length; i++) {
var vertex = vertices[i];
Expand Down

0 comments on commit dd5e260

Please sign in to comment.