com.hedgehog.gdzietabiedra.appservice / DistanceCalculator / calculateDistance
calculateDistance
fun calculateDistance(pointA: Position, pointB: Position): Double (source)
Calculates distance in meters in straight line between 2 Positions
val positionA = Position(52.6546, 58.3541)
val positionB = Position(58.46, 57.35)
val distanceInMeters = DistanceCalculator().calculateDistance(positionA, positionB)
Parameters
pointA - first position
pointB - second position
Return Double distance in straight line between 2 Positions in meters.