Skip to content

Commit

Permalink
fix temperature units spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Jun 22, 2024
1 parent 2391a94 commit b34d8ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/units/Temperature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>(value)); }

constexpr Temperature operator""_celcius(long double value) { return Temperature(static_cast<double>(value) + 273.15); }
constexpr Temperature operator""_celsius(long double value) { return Temperature(static_cast<double>(value) + 273.15); }

constexpr Temperature operator""_celcius(unsigned long long value) {
constexpr Temperature operator""_celsius(unsigned long long value) {
return Temperature(static_cast<double>(value) + 273.15);
}

constexpr Temperature operator""_farenheight(long double value) {
constexpr Temperature operator""_fahrenheit(long double value) {
return Temperature((static_cast<double>(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<double>(value) - 32) * (5.0 / 9.0) + 273.5);
}

Expand All @@ -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

0 comments on commit b34d8ea

Please sign in to comment.