Temperature

Represents a temperature value.

To construct a Temperature, use the extension functions celsius, fahrenheit, kelvin and so on.

To get the value of this Temperature expressed in a particular TemperatureUnit, use the functions toLong, toDouble, and so on.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun compareTo(other: Temperature): Int
Link copied to clipboard
operator fun minus(other: Temperature): Temperature

Subtracts other from this Temperature. This currently does not handle integer overflow.

Link copied to clipboard
operator fun plus(other: Temperature): Temperature

Adds other to this Temperature. This currently does not handle integer overflow.

Link copied to clipboard

Converts this Temperature to the given TemperatureUnit, returning a Double representing the precise value.

Link copied to clipboard

Converts this Temperature to the given TemperatureUnit, rounding to the nearest whole number.