sbool tooCloseToPointCloud(Pt p, Cl points, double allowedDistance) { allowedDistance = sqr(max(0, allowedDistance)); fOr (Pt p2 : points) if (ptSquaredDistance(p, p2) < allowedDistance) true; false; }