【競プロメモ】3点を結ぶ三角形の面積

競プロ以前の話ですが、思い出せなかったのでメモを残しておきます。

int x1, y1;// p1
int x2, y2;// p2
int x3, y3;// p3
float s = abs((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2;