22 lines
676 B
Text
22 lines
676 B
Text
```
|
||
```
|
||
|
||
morph_celsius_to_kelvin ()
|
||
Temperature ~ Celsius ~ ℝ ~ native.Float32
|
||
--> Temperature ~ Kelvin ~ ℝ ~ native.Float32
|
||
```*dst = *src + 273.15;```
|
||
|
||
morph_kelvin_to_celsius ()
|
||
Temperature ~ Kelvin ~ ℝ ~ native.Float32
|
||
--> Temperature ~ Celsius ~ ℝ ~ native.Float32
|
||
```*dst = *src - 273.15;```
|
||
|
||
morph_celsius_to_fahrenheit ()
|
||
Temperature ~ Celsius ~ ℝ ~ native.Float32
|
||
--> Temperature ~ Fahrenheit ~ ℝ ~ native.Float32
|
||
```*dst = (*src * 9.0 / 5.0) + 32.0;```
|
||
|
||
morph_fahrenheit_to_celsius ()
|
||
Temperature ~ Fahrenheit ~ ℝ ~ native.Float32
|
||
--> Temperature ~ Celsius ~ ℝ ~ native.Float32
|
||
```*dst = (*src - 32.0) * 5.0 / 9.0;```
|