class Velocity : Comparable


Represents a unit of speed. Supported units:

Summary

Public companion functions

Velocity

Creates Velocity with the specified value in kilometers per hour.

Velocity

Creates Velocity with the specified value in meters per second.

Velocity

Creates Velocity with the specified value in miles per hour.

Public functions

open operator Int
open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Double

Returns the velocity in kilometers per hour.

Double

Returns the velocity in meters per second.

Double

Returns the velocity in miles per hour.

Public companion functions

kilometersPerHour

Added in 1.1.0-alpha07
fun kilometersPerHour(value: Double): Velocity

Creates Velocity with the specified value in kilometers per hour.

metersPerSecond

Added in 1.1.0-alpha07
fun metersPerSecond(value: Double): Velocity

Creates Velocity with the specified value in meters per second.

milesPerHour

Added in 1.1.0-alpha07
fun milesPerHour(value: Double): Velocity

Creates Velocity with the specified value in miles per hour.

Public functions

compareTo

Added in 1.1.0-alpha07
open operator fun compareTo(other: Velocity): Int

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

inKilometersPerHour

Added in 1.1.0-alpha07
val inKilometersPerHourDouble

Returns the velocity in kilometers per hour.

inMetersPerSecond

Added in 1.1.0-alpha07
val inMetersPerSecondDouble

Returns the velocity in meters per second.

inMilesPerHour

Added in 1.1.0-alpha07
val inMilesPerHourDouble

Returns the velocity in miles per hour.