StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
282 stars 89 forks source link

fix for NGon-fans and arcs become larger angle on specific angles and numSides. #151

Closed drumsoft closed 7 years ago

drumsoft commented 7 years ago

NGon angle become larger than expected when its startAngle or endAngle are almost on vertices of regular polygon.

example: startAngle==-12 or endAngle==-336 on numSides=60.

In test case 02_NGon_Test, It is expected that the three fan shapes (red, green. blue) will be almost overlapped. But the red fan angle become larger with unfixed code. This also occurs in the case of arcs.