42 for (i = 0, j = n-1; i < n; j = i++) {
43 if ((V[i].y > P.
y) == (V[j].
y > P.
y)) {
46 const int32_t dx1 = P.
x - V[i].
x;
47 const int32_t dx2 = V[j].
x - V[i].
x;
48 const int32_t dy1 = P.
y - V[i].
y;
49 const int32_t dy2 = V[j].
y - V[i].
y;
50 const int8_t dx1s = (dx1 < 0) ? -1 : 1;
51 const int8_t dx2s = (dx2 < 0) ? -1 : 1;
52 const int8_t dy1s = (dy1 < 0) ? -1 : 1;
53 const int8_t dy2s = (dy2 < 0) ? -1 : 1;
54 const int8_t m1 = dx1s * dy2s;
55 const int8_t m2 = dx2s * dy1s;
62 }
else if ( dx1 * (int64_t)dy2 > dx2 * (int64_t)dy1 ) {
70 }
else if ( dx1 * (int64_t)dy2 < dx2 * (int64_t)dy1 ) {
88 return (n >= 4 && V[n-1] == V[0]);
template bool Polygon_complete< int32_t >(const Vector2l *V, unsigned n)
bool Polygon_complete(const Vector2< T > *V, unsigned n)
template bool Polygon_outside< float >(const Vector2f &P, const Vector2f *V, unsigned n)
template bool Polygon_complete< float >(const Vector2f *V, unsigned n)
template bool Polygon_outside< int32_t >(const Vector2l &P, const Vector2l *V, unsigned n)
bool Polygon_outside(const Vector2< T > &P, const Vector2< T > *V, unsigned n)