As per the study of point-containment algorithms and analysis of some irregular polygons, I've personally observed that in some cases this approach(Ray-casting algorithm) fail's if,
The ray drawn from test point crosses(intersects) once and then just “touches” one point on the outside, forming something like a “tangent”
The polygon is of self-intersecting type and the ray drawn from test point crosses exactly through such a crossing point
The ray crosses a section of a polygon where two lines of the this same polygon are drawn exactly on top of each other
So can some one please suggest a solution or an optional approach for the point containment check that can give a more robust and optimized results?