Unity.Conversion.Temperature (Unity v0.7.0)

Copy Markdown View Source

Nonlinear forward/inverse conversions for GNU Units temperature scales (tempC, tempF, tempreaumur).

Each function pair converts between a temperature scale reading and kelvin. The forward function takes a scale value and returns kelvin; the inverse takes kelvin and returns the scale value.

These are registered as :special custom units so that both tempC(100) (function call) and 100 tempc to kelvin (unit conversion) work through the same mechanism.

Summary

Functions

Celsius to kelvin.

Kelvin to Celsius.

Fahrenheit to kelvin.

Kelvin to Fahrenheit.

Réaumur to kelvin.

Kelvin to Réaumur.

Functions

celsius_forward(x)

@spec celsius_forward(number()) :: float()

Celsius to kelvin.

celsius_inverse(k)

@spec celsius_inverse(number()) :: float()

Kelvin to Celsius.

fahrenheit_forward(x)

@spec fahrenheit_forward(number()) :: float()

Fahrenheit to kelvin.

fahrenheit_inverse(k)

@spec fahrenheit_inverse(number()) :: float()

Kelvin to Fahrenheit.

reaumur_forward(x)

@spec reaumur_forward(number()) :: float()

Réaumur to kelvin.

reaumur_inverse(k)

@spec reaumur_inverse(number()) :: float()

Kelvin to Réaumur.