ヘロンは sqrt で誤差が出るのでできれば避けるべき.三点から面積を出すのは外積が常套手段:

double triangle(const Point*p1,const Point*p2,const Point*p3){
  double x1 = p2->x - p1->x, x2 = p3->x - p1->x;
  double y1 = p2->y - p1->y, y2 = p3->y - p1->y;
  double S = (x1 * y2 - x2 * y1) / 2.0;
  return S >= 0 ? S : -S;
}