tripkit-android / com.skedgo.tripkit.common.util / PolyUtil / distanceToLine

distanceToLine

open static fun distanceToLine(p:TripKitLatLng!, start:TripKitLatLng!, end:TripKitLatLng!):Double

Computes the distance on the sphere between the point p and the line segment start to end.

Parameters

p - TripKitLatLng!: the point to be measured

start - TripKitLatLng!: the beginning of the line segment

end - TripKitLatLng!: the end of the line segment

Return Double: the distance in meters (assuming spherical earth)