Fix a couple minor mis-spelings in

OpenLayers.Geometry.Polygon.createRegularPolygon (Closes #1214)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5439 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-12-16 20:00:20 +00:00
parent 6ad22b8e6a
commit b5b1cd3c9d

View File

@@ -76,10 +76,10 @@ OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, side
if(rotation) {
angle += (rotation / 180) * Math.PI;
}
var rotateAngle, x, y;
var rotatedAngle, x, y;
var points = [];
for(var i=0; i<sides; ++i) {
var rotatedAngle = angle + (i * 2 * Math.PI / sides);
rotatedAngle = angle + (i * 2 * Math.PI / sides);
x = origin.x + (radius * Math.cos(rotatedAngle));
y = origin.y + (radius * Math.sin(rotatedAngle));
points.push(new OpenLayers.Geometry.Point(x, y));