생각해보니까 그렇네요.
side1=Math.sqrt((x1 - x)*(x1 - x) + (y1 - y)* (y1 - y));
side2=Math.sqrt((x1 - x4)*(x1 - x4) + (y1 - y4)*(y1 - y4));
side3=Math.sqrt((x4-x)*(x4-x)+(y3-y)*(y3-y));
s = (side1 + side2 + side3)/2;
area2=Math.sqrt((s*(s - side1)*(s - side2)*(s - side3)));
공식 잘 못 쓰셨어요 ㅋㅋ