[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_circle_basic.c



  User: pcjc2   
  Date: 07/04/21 08:00:20

  Modified:    .        o_circle_basic.c
  Log:
  Tidy up dist() function in o_circle_basic.c to be much more readable.
  
  
  
  
  Revision  Changes    Path
  1.30      +1 -11     eda/geda/gaf/libgeda/src/o_circle_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_circle_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_circle_basic.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- o_circle_basic.c	17 Apr 2007 20:19:21 -0000	1.29
  +++ o_circle_basic.c	21 Apr 2007 12:00:20 -0000	1.30
  @@ -47,17 +47,7 @@
    */
   int dist(int x1, int y1, int x2, int y2)
   {
  -  int dx1, dy1;
  -  int dx2, dy2;
  -  int ret;
  -
  -  dx1 = x1;
  -  dy1 = y1;
  -  dx2 = x2;
  -  dy2 = y2;
  -
  -  ret =  sqrt(pow(dx1-dx2,2)+pow(dy1-dy2,2)) ;
  -  return( ret );
  +  return sqrt(pow(x1-x2,2)+pow(y1-y2,2));
   }
   
   /*! \brief Create and add circle OBJECT to list.
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs