Companion

object Companion

Properties

Link copied to clipboard
const val EARTH_RADIUS_KM: Double = 6371.0

An approximation of the radius of the earth. This is used to convert between radians and kilometers or miles.

Link copied to clipboard
const val KM_PR_MILE: Double = 1.609344

The constant used convert between kilometers and the internationale (or statute) mile.

Functions

Link copied to clipboard
fun fromDegrees(degrees: Double): Distance

Create a Distance object from degrees.

Link copied to clipboard

Create a Distance object from kilometers.

Link copied to clipboard

Create a Distance object from miles.

Link copied to clipboard
fun fromRadians(radians: Double): Distance

Create a Distance object from radians.