Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fg_coordmidpoint http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                             fg_coordmidpoint

   Usage
   #include <fg.h>
   fg_coord_t far fg_coordmidpoint(fg_coord_t a, fg_coord_t b);

   Description
   Returns the midpoint of two points on the same axis.

   Example
   fg_coord_t x_center, y_center;
   x_center   =  fg_coordmidpoint(fg.displaybox  [FG_X2],   fg.displaybox
   [FG_X1]);
   y_center   =  fg_coordmidpoint(fg.displaybox  [FG_Y2],   fg.displaybox
   [FG_Y1]);
   fg_drawdot(FG_WHITE, FG_MODE_SET, ~0, x_center, y_center);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson