#include #define Sgn(a) ( ((a) == 0) ? (0) : ((a)>0)*2-1 ) #define SetRGB0(c, _r, _g, _b) \ (c)->r0 = (_r), \ (c)->g0 = (_g), \ (c)->b0 = (_b) #define SetRGB1(c, _r, _g, _b) \ (c)->r1 = (_r), \ (c)->g1 = (_g), \ (c)->b1 = (_b) typedef struct { long sx, sy, ex, ey; } Line; int LineCollision(Line a, Line b);