replace native.Float/native.Double with native.Float32/native.Float64

This commit is contained in:
Michael Sippel 2025-03-25 19:38:56 +01:00
parent 21bb33193a
commit bce52e9fcf
Signed by: senvas
GPG key ID: F96CF119C34B64A6
3 changed files with 38 additions and 38 deletions

View file

@ -2,32 +2,32 @@
```
morph_celsius_to_kelvin ()
Temperature ~ Celsius ~ ~ native.Float
--> Temperature ~ Kelvin ~ ~ native.Float
Temperature ~ Celsius ~ ~ native.Float32
--> Temperature ~ Kelvin ~ ~ native.Float32
```
*dst = *src + 273.15;
return 0;
```
morph_kelvin_to_celsius ()
Temperature ~ Kelvin ~ ~ native.Float
--> Temperature ~ Celsius ~ ~ native.Float
Temperature ~ Kelvin ~ ~ native.Float32
--> Temperature ~ Celsius ~ ~ native.Float32
```
*dst = *src - 273.15;
return 0;
```
morph_celsius_to_fahrenheit ()
Temperature ~ Celsius ~ ~ native.Float
--> Temperature ~ Fahrenheit ~ ~ native.Float
Temperature ~ Celsius ~ ~ native.Float32
--> Temperature ~ Fahrenheit ~ ~ native.Float32
```
*dst = (*src * 9.0 / 5.0) + 32.0;
return 0;
```
morph_fahrenheit_to_celsius ()
Temperature ~ Fahrenheit ~ ~ native.Float
--> Temperature ~ Celsius ~ ~ native.Float
Temperature ~ Fahrenheit ~ ~ native.Float32
--> Temperature ~ Celsius ~ ~ native.Float32
```
*dst = (*src - 32.0) * 5.0 / 9.0;
return 0;