cvs: gd /libgd gd.c

[email protected] ("Pierre-Alain Joye")
Newsgroups php.gd.cvs
Message-ID <cvspajoye1181849037@cvsserver>
pajoye		Thu Jun 14 19:23:57 2007 UTC

  Modified files:              
    /gd/libgd	gd.c 
  Log:
  - WS
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.58&r2=1.59&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.58 gd/libgd/gd.c:1.59
--- gd/libgd/gd.c:1.58	Sat Jun  9 12:32:25 2007
+++ gd/libgd/gd.c	Thu Jun 14 19:23:57 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.58 2007/06/09 12:32:25 pajoye Exp $ */
+/* $Id: gd.c,v 1.59 2007/06/14 19:23:57 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -1609,18 +1609,29 @@
   int lx = 0, ly = 0;
   int fx = 0, fy = 0;
 
-	if (s > 360) {
-		s = s % 360;
-	}
+  if ((s % 360)  == (e % 360)) {
+	  s = 0; e = 360;
+  } else {
+	  if (s > 360) {
+		  s = s % 360;
+	  }
 
-	if (e > 360) {
-		e = e % 360;
-	}
+	  if (e > 360) {
+		  e = e % 360;
+	  }
 
-  while (e < s)
-    {
-      e += 360;
-    }
+	  while (s < 0) {
+		  s += 360;
+	  }
+
+	  while (e < s) {
+		  e += 360;
+	  }
+
+	  if (s == e) {
+		  s = 0; e = 360;
+	  }
+  }
 
   for (i = s; (i <= e); i++)
     {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.