| 22 | } |
| 23 | |
| 24 | double ccw(struct point a, struct point b, struct point c) { |
| 25 | return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x); |
| 26 | } |
| 27 | |
| 28 | double polar_angle(struct point origin, struct point p) { |
| 29 | return atan2(p.y - origin.y, p.x - origin.x); |