つまりはこういう事ですか?
#include<stdio.h>
struct point{
double x;
double y;
};
double triangle(const struct point*p1,const struct point*p2,const struct point*p3){
double x1 = p3->x - p1->x;
double y1 = p2->y - p1->y;
double x2 = p2->x - p1->x;
double y2 = p3->y - p1->y;
double s = (x1 * y1 - x2 * y2) / 2.0;
if (s < 0 )
s *= -1;
return s;
}

int main(void){
const struct point p1={1,2},p2={5,4},p3={-2,3};
printf("%f\n",triangle(&p1,&p2,&p3));
return 0;
}

試しに数字を入れてみたのですが、答えが3にならなければならいのに5に
なってしまいました・・orz