Browse Source

Draw pie : positive number of segments computed if initial nb is 0

Fl0xer 8 years ago
parent
commit
38f872dbc4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      h2d/Graphics.hx

+ 1 - 1
h2d/Graphics.hx

@@ -436,7 +436,7 @@ class Graphics extends Drawable {
 		flush();
 		lineTo(cx, cy);
 		if( nsegments == 0 )
-			nsegments = Math.ceil(ray * angleLength / 4);
+			nsegments = Math.ceil(Math.abs(ray * angleLength / 4));
 		if( nsegments < 3 ) nsegments = 3;
 		var angle = angleLength / (nsegments - 1);
 		for( i in 0...nsegments ) {