#include "tconv_utils.h"
/* Here we implement functions for converting from a unit to another... It's really boring : */
double C2F(double celsius)
{
double fahrenheit = (celsius + 32) * 9 / 5;
return fahrenheit;
}
double C2K(double celsius)
{
double kelvin = celsius + 273.15;
return kelvin;
}
double F2C(double fahrenheit)
{
double celsius = (fahrenheit - 32) * 5 / 9;
return celsius;
}
double F2K(double fahrenheit)
{
double kelvin = C2K(F2C(fahrenheit));
return kelvin;
}
double K2C(double kelvin)
{
double celsius = kelvin - 273.15;
return celsius;
}
double K2F(double kelvin)
{
double fahrenheit = C2F(K2C(kelvin));
return fahrenheit;
}