Energy
class Energy : Comparable
Represents a unit of energy. Supported units:
-
calories - see
Energy.calories,Double.calories -
kilocalories - see
Energy.kilocalories,Double.kilocalories -
joules - see
Energy.joules,Double.joules -
kilojoules - see
Energy.kilojoules,Double.kilojoules
Summary
Public companion functions |
|
|---|---|
Energy |
Creates |
Energy |
Creates |
Energy |
kilocalories(value: Double)Creates |
Energy |
kilojoules(value: Double)Creates |
Public properties |
|
|---|---|
Double |
Returns the energy in calories. |
Double |
Returns the energy in joules. |
Double |
Returns the energy in kilocalories. |
Double |
Returns the energy in kilojoules. |
Public companion functions
calories
fun calories(value: Double): Energy
Creates Energy with the specified value in calories.
joules
fun joules(value: Double): Energy
Creates Energy with the specified value in joules.
kilocalories
fun kilocalories(value: Double): Energy
Creates Energy with the specified value in kilocalories.
kilojoules
fun kilojoules(value: Double): Energy
Creates Energy with the specified value in kilojoules.