1 typedef struct {
2   long int p_x, p_y;
3 } Point;
4 
5 int
f(Point basePt,Point pt1,Point pt2)6 f (Point basePt, Point pt1, Point pt2)
7 {
8   long long vector;
9 
10   vector =
11     (long long) (pt1.p_x - basePt.p_x) * (long long) (pt2.p_y - basePt.p_y) -
12       (long long) (pt1.p_y - basePt.p_y) * (long long) (pt2.p_x - basePt.p_x);
13 
14   if (vector > (long long) 0)
15     return 0;
16   else if (vector < (long long) 0)
17     return 1;
18   else
19     return 2;
20 }
21 
main()22 main ()
23 {
24   Point b, p1, p2;
25   int answer;
26 
27   b.p_x = -23250;
28   b.p_y = 23250;
29 
30   p1.p_x = 23250;
31   p1.p_y = -23250;
32 
33   p2.p_x = -23250;
34   p2.p_y = -23250;
35 
36   answer = f (b, p1, p2);
37 
38   if (answer != 1)
39     abort ();
40   exit (0);
41 }
42