Distance

data class Distance : Parcelable

Important: This is a Public Preview API. It may be changed or removed at any time.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
operator fun compareTo(distance: Distance): Int

Implements the <=, => compare logic, so class can be used in expressions such as @sample oneDistance <= anotherDistance.

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
operator fun div(distance: Distance): Distance

operator fun div(divisor: Double): Distance

Divides this Distance by the divisor and returns result as Distance.

Link copied to clipboard
fun formattedDistance(): String

Return formatted distance, with dot decimal separator.

Link copied to clipboard
fun inCentimeters(): Double
Link copied to clipboard
fun inFeet(): Double
Link copied to clipboard
fun inKilometers(): Double
Link copied to clipboard
fun inMeters(): Double
Link copied to clipboard
fun inMiles(): Double
Link copied to clipboard
fun isZero(): Boolean
Link copied to clipboard
operator fun minus(distance: Distance): Distance
Link copied to clipboard
operator fun plus(distance: Distance): Distance
Link copied to clipboard
operator fun times(distance: Distance): Distance

operator fun times(factor: Double): Distance

Multiplies this Distance by the factor and returns result as Distance.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)