I's looking for simple(easy to implement algorithm) to check whether a point is inside the square/rectangle/polygon(convex)
I use CAShaperLayer to draw the polygon and I know there is hittest method in CAShaperLayer. For some reason, I don't allow to use hittest.
What I did so far:
I use a circle to approximate the polygon and check whether a point is inside the circle(choose three points and generate a circle since three point determine a circle). The approximate method works but it is not accurate.