private Vector2?ExitIntersection()
        {
            if (!polygonBegin.HasValue || PEdge.Cross(QEdge) >= 0)
            {
                return(null);
            }

            SegmentSegmentIntersectionResult?result = SegmentSegmentIntersection(PPrev, P, QPrev, Q);

            if (result.HasValue)
            {
                return(result.Value.position);
            }

            return(null);
        }
        private Vector2?EntranceIntersection()
        {
            if (PEdge.Cross(QEdge) <= 0)
            {
                return(null);
            }

            SegmentSegmentIntersectionResult?result = SegmentSegmentIntersection(PPrev, P, QPrev, Q);

            if (result.HasValue && result.Value.at < 1 && result.Value.bt < 1)
            {
                return(result.Value.position);
            }

            return(null);
        }