Skip to content

Commit

Permalink
Fix long double casting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 23, 2024
1 parent 84d827a commit 316034a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/Numerics/Radians.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ namespace Numerics
return Radians<FloatT>{std::asin(value)};
}

constexpr Radians<double> operator"" _rad(long double r) { return Radians<double>{r}; }
constexpr Radians<double> operator"" _deg(long double d) { return Radians<double>{d * D2R}; }
constexpr Radians<double> operator"" _rad(long double r) { return Radians<double>{static_cast<double>(r)}; }
constexpr Radians<double> operator"" _deg(long double d) { return Radians<double>{static_cast<double>(d * D2R)}; }

constexpr Radians<double> operator"" _rad(unsigned long long r) { return Radians<double>{r}; }
constexpr Radians<double> operator"" _deg(unsigned long long d) { return Radians<double>{static_cast<long double>(d) * D2R}; }
constexpr Radians<double> operator"" _rad(unsigned long long r) { return Radians<double>{static_cast<double>(r)}; }
constexpr Radians<double> operator"" _deg(unsigned long long d) { return Radians<double>{static_cast<double>(d * D2R)}; }

extern template struct Radians<float>;
extern template struct Radians<double>;
Expand Down

0 comments on commit 316034a

Please sign in to comment.