Temperature
class Temperature : Comparable
Represents a unit of temperature. Supported units:
-
Celsius - see
Temperature.celsius,Double.celsius -
Fahrenheit - see
Temperature.fahrenheit,Double.fahrenheit
Summary
Public companion functions |
|
|---|---|
Temperature |
Creates |
Temperature |
fahrenheit(value: Double)Creates |
Public functions |
|
|---|---|
open operator Int |
compareTo(other: Temperature) |
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
Double |
Returns the temperature in Celsius degrees. |
Double |
Returns the temperature in Fahrenheit degrees. |
Public companion functions
celsius
Added in 1.1.0
fun celsius(value: Double): Temperature
Creates Temperature with the specified value in Celsius degrees.
fahrenheit
Added in 1.1.0
fun fahrenheit(value: Double): Temperature
Creates Temperature with the specified value in Fahrenheit degrees.