// temperature.cpp // definizione funzioni per conversioni temperature #include "temperature.h" //--------------------------------------------- double FahrToCelsius(double tempFahr) { return (tempFahr - 32.0) / 1.8; } //--------------------------------------------- double CelsiusToFahr(double tempCels) { return tempCels * 1.8 + 32.0; } //--------------------------------------------- double KelvinToCelsius(double tempKelv) { return tempKelv - 273.15; } //--------------------------------------------- double CelsiusToKelvin(double tempCels) { return tempCels + 273.15; } //--------------------------------------------- double FahrToKelvin(double tempFahr) { return (tempFahr - 32.0) / 1.8 + 273.15; } //--------------------------------------------- double KelvinToFahr(double tempKelv) { return (tempKelv - 273.15) * 1.8 + 32.0; }