min_dist function

Minimal distance between one point to many points