Merge pull request #6584 from Trissolo/fix/geomPolygon-unused-code

Remove unused code in Geom.Polygon#setTo
This commit is contained in:
Richard Davey 2023-08-28 15:27:45 +01:00 committed by GitHub
commit 2a5bf0e5f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,6 @@ var Polygon = new Class({
}
var p;
var y0 = Number.MAX_VALUE;
// The points argument is an array, so iterate through it
for (var i = 0; i < points.length; i++)
@ -151,15 +150,9 @@ var Polygon = new Class({
}
this.points.push(p);
// Lowest boundary
if (p.y < y0)
{
y0 = p.y;
}
}
this.calculateArea(y0);
this.calculateArea();
return this;
},