소스 검색

Merge pull request #45 from desktop/master

actually fix drawCircle artifact (attempt 2)
Nicolas Cannasse 11 년 전
부모
커밋
dda526de3b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      h2d/Graphics.hx

+ 1 - 1
h2d/Graphics.hx

@@ -266,7 +266,7 @@ class Graphics extends Drawable {
 		if( nsegments == 0 )
 			nsegments = Math.ceil(ray * 3.14 * 2 / 4);
 		if( nsegments < 3 ) nsegments = 3;
-		var angle = Math.PI * 2 / (nsegments + 1);
+		var angle = Math.PI * 2 / nsegments;
 		for( i in 0...nsegments ) {
 			var a = i * angle;
 			addPoint(cx + Math.cos(a) * ray, cy + Math.sin(a) * ray);