// There is a corner case here: if min_distance_ is larger than
// distance_ but the spring is fixed, then inv_k will be zero
// and we need to make sure that we return min_distance_.
// There is a corner case here: if min_distance_ is larger than
// distance_ but the spring is fixed, then inv_k will be zero
// and we need to make sure that we return min_distance_.