S2Polyline.unInterpolate

The inverse operation of GetSuffix/Interpolate. Given a point on the polyline, returns the ratio of the distance to the point from the beginning of the polyline over the length of the polyline. The return value is always betwen 0 and 1 inclusive. See GetSuffix() for the meaning of "next_vertex".

The polyline should not be empty. If it has fewer than 2 vertices, the return value is zero.

class S2Polyline
const
double
unInterpolate

Meta