/* * area of a triangle */ #include #include "geom.h" double area(struct triangle t) { return 0.5*(fabs((t.b.x - t.a.x)*(t.c.y - t.a.y) - (t.c.x - t.a.x)*(t.b.y - t.a.y))); }