added method to test if a point is on the boundary