2022-11-12 20:03:08 +00:00
|
|
|
const convertToCelsius = function(fahrenheit) {
|
|
|
|
return Math.round((fahrenheit - 32) * (5/9) * 10) / 10;
|
2021-05-10 08:08:31 +00:00
|
|
|
};
|
2017-08-25 15:27:07 +00:00
|
|
|
|
2022-11-12 20:03:08 +00:00
|
|
|
const convertToFahrenheit = function(celsius) {
|
|
|
|
return Math.round(((celsius * 9/5) + 32) * 10) / 10;
|
2021-05-10 08:08:31 +00:00
|
|
|
};
|
2017-08-25 15:27:07 +00:00
|
|
|
|
2021-05-17 23:42:57 +00:00
|
|
|
|
2017-08-25 15:27:07 +00:00
|
|
|
module.exports = {
|
2022-11-12 19:56:14 +00:00
|
|
|
convertToCelsius,
|
|
|
|
convertToFahrenheit
|
2021-05-10 08:08:31 +00:00
|
|
|
};
|