sentences:  The crossing number is even if and only if the point is outside the polygon.This algorithm works because if the ray never crosses the polygon, then its crossing number is zero, which is even, and the point is outside.Every time the ray does cross the polygon, the crossing number alternates between even and odd, and the point at its tip alternates between outside and inside.