mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
Changed bounds checking MIN_VALUE to -MAX_VALUE. Fixes #202
WIP #202. Changing Number.MAX_VALUE to Infinity
This commit is contained in:
parent
34fa27ac97
commit
dd5e2602e9
1 changed files with 4 additions and 4 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue