Distance to a set (source code)

= Distance to a set

For a metric space, $d(x,S)=\inf_{s\in S}d(x,s)$ is $1$-Lipschitz and vanishes on the closure of $S$.