| 164 | inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } |
| 165 | |
| 166 | inline int area2(const int* a, const int* b, const int* c) |
| 167 | { |
| 168 | return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]); |
| 169 | } |
| 170 | |
| 171 | // Exclusive or: true iff exactly one argument is true. |
| 172 | // The arguments are negated to ensure that they are 0/1 |