~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/math/geom/hull2.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)Find max and min x,y extent of a set of vectors sequentially
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/math.h>
  5 #include <tina/mathfuncs.h>
  6 
  7 
  8 void    vec2_extend_hull(Vec2 * vmin, Vec2 * vmax, Vec2 v)
  9 {
 10     double  xmin = vec2_x(*vmin), ymin = vec2_y(*vmin);
 11     double  xmax = vec2_x(*vmax), ymax = vec2_y(*vmax);
 12     double  s;
 13 
 14     s = vec2_x(v);
 15     if (s < xmin)
 16         xmin = s;
 17     if (s > xmax)
 18         xmax = s;
 19     s = vec2_y(v);
 20     if (s < ymin)
 21         ymin = s;
 22     if (s > ymax)
 23         ymax = s;
 24     *vmin = vec2(xmin, ymin);
 25     *vmax = vec2(xmax, ymax);
 26 }
 27 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.