Computes the distance between point p and segment v(vs, ve)
Note: this assumes that the projection of p on the line l going through (vs, ve) is between vs and ve. (0 <= compute_s(p, vs, ve) <= 1)