Detection of a point inside a 2D polygon seems to work. Simple tests included.