curve.endpointDistance()

Return the distance between curve start and end points.