fixed enclosing check, it matters what order you give the points to inpolygon