We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3f9cb15 + 3f5de71 commit 53c579aCopy full SHA for 53c579a
1 file changed
src/geom/Rectangle.js
@@ -975,10 +975,10 @@ Phaser.Rectangle.aabb = function(points, out) {
975
out = new Phaser.Rectangle();
976
}
977
978
- var xMax = Number.MIN_VALUE,
979
- xMin = Number.MAX_VALUE,
980
- yMax = Number.MIN_VALUE,
981
- yMin = Number.MAX_VALUE;
+ var xMax = Number.NEGATIVE_INFINITY,
+ xMin = Number.POSITIVE_INFINITY,
+ yMax = Number.NEGATIVE_INFINITY,
+ yMin = Number.POSITIVE_INFINITY;
982
983
points.forEach(function(point) {
984
if (point.x > xMax) {
0 commit comments