From b34d8ea5ddf39dccdd5d0fb4c0d4fe56f4662033 Mon Sep 17 00:00:00 2001 From: Liam Teale <111480281+SizzinSeal@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:19:34 -0700 Subject: [PATCH] fix temperature units spelling --- include/units/Temperature.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/units/Temperature.hpp b/include/units/Temperature.hpp index c9004ad..5229ebb 100644 --- a/include/units/Temperature.hpp +++ b/include/units/Temperature.hpp @@ -11,17 +11,17 @@ constexpr Temperature operator""_kelvin(long double value) { return Temperature( constexpr Temperature operator""_kelvin(unsigned long long value) { return Temperature(static_cast(value)); } -constexpr Temperature operator""_celcius(long double value) { return Temperature(static_cast(value) + 273.15); } +constexpr Temperature operator""_celsius(long double value) { return Temperature(static_cast(value) + 273.15); } -constexpr Temperature operator""_celcius(unsigned long long value) { +constexpr Temperature operator""_celsius(unsigned long long value) { return Temperature(static_cast(value) + 273.15); } -constexpr Temperature operator""_farenheight(long double value) { +constexpr Temperature operator""_fahrenheit(long double value) { return Temperature((static_cast(value) - 32) * (5.0 / 9.0) + 273.5); } -constexpr Temperature operator""_farenheight(unsigned long long value) { +constexpr Temperature operator""_fahrenheit(unsigned long long value) { return Temperature((static_cast(value) - 32) * (5.0 / 9.0) + 273.5); } @@ -31,12 +31,12 @@ constexpr inline Temperature from_kelvin(double value) { return Temperature(valu constexpr inline double to_kelvin(Temperature quantity) { return quantity.val(); } -constexpr inline Temperature from_celcius(double value) { return Temperature(value + 273.15); } +constexpr inline Temperature from_celsius(double value) { return Temperature(value + 273.15); } -constexpr inline double to_celcius(Temperature quantity) { return quantity.val() - 273.15; } +constexpr inline double to_celsius(Temperature quantity) { return quantity.val() - 273.15; } -constexpr inline Temperature from_farenheight(double value) { return Temperature((value - 32) * (5.0 / 9.0) + 273.15); } +constexpr inline Temperature from_fahrenheit(double value) { return Temperature((value - 32) * (5.0 / 9.0) + 273.15); } -constexpr inline double to_farenheight(Temperature quantity) { return (quantity.val() - 273.15) * (9.0 / 5.0) + 32; } +constexpr inline double to_fahrenheit(Temperature quantity) { return (quantity.val() - 273.15) * (9.0 / 5.0) + 32; } } // namespace units \ No newline at end of file