Changed winding order for CirclePolygon to CCW

Thanks @antonioromano for finding this bug and suggesting the fix.

closes #91
This commit is contained in:
Josh Baker 2016-12-05 08:06:48 -07:00
parent ae0eb64526
commit 196016688b
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ func CirclePolygon(x, y, meters float64, steps int) Polygon {
center := Position{X: x, Y: y, Z: 0}
step := 360.0 / float64(steps)
i := 0
for deg := float64(0); deg < 360; deg += step {
for deg := 360.0; deg > 0; deg -= step {
c := Position(poly.Point(center.Destination(meters, deg)))
p.Coordinates[0][i] = c
i++