function res = ccw(site_a, site_b, site_c)

x1 = site_a.x;
y1 = site_a.y;

x2 = site_b.x;
y2 = site_b.y;

x3 = site_c.x;
y3 = site_c.y;


res = (x2*y3-y2*x3) - (x1*y3-y1*x3) + (x1*y2-y1*x2);


%float ccw(site_struct *a, site_struct *b, site_struct *c)
%  {
%    double x1 = a->x, y1 = a->y;
%    double x2 = b->x, y2 = b->y;
%    double x3 = c->x, y3 = c->y;
%
%    return (x2*y3-y2*x3) - (x1*y3-y1*x3) + (x1*y2-y1*x2);
%  }
