Is this point in the polygon?

Function containsPoint modified to use less memory
containsPoint added to the main, to test it