Skip to content

Commit 53c579a

Browse files
committed
Merge pull request phaserjs#2545 from fillmoreb/patch-3
Fix Phaser.Rectangle.aabb()
2 parents 3f9cb15 + 3f5de71 commit 53c579a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/geom/Rectangle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -975,10 +975,10 @@ Phaser.Rectangle.aabb = function(points, out) {
975975
out = new Phaser.Rectangle();
976976
}
977977

978-
var xMax = Number.MIN_VALUE,
979-
xMin = Number.MAX_VALUE,
980-
yMax = Number.MIN_VALUE,
981-
yMin = Number.MAX_VALUE;
978+
var xMax = Number.NEGATIVE_INFINITY,
979+
xMin = Number.POSITIVE_INFINITY,
980+
yMax = Number.NEGATIVE_INFINITY,
981+
yMin = Number.POSITIVE_INFINITY;
982982

983983
points.forEach(function(point) {
984984
if (point.x > xMax) {

0 commit comments

Comments
 (0)