Js determines if the point is inside an area