The improvement of well known Crossing Number (cn) algorithm for determining the inclusion of a point P in a 2D planar polygon.
This implementation (i.e. function - is_inside_sm() ) is tested against standard Crossing Number (cn) algorithm and Winding Number (wn) algorithm.
Unlike standard implementations (cn and wn), this one WORKS ON EDGES, providing (at least) equally good execution speed. ![]()
(The Python implementation of the same algorithm is given here.)