This commit is contained in:
2025-08-18 18:59:46 +03:00
parent ca74d1dd73
commit 3640882874
11 changed files with 1355 additions and 1108 deletions

View File

@@ -403,9 +403,9 @@ template <std::convertible_to<MccAngle> T1, std::convertible_to<MccAngle> T2>
static auto operator*(const T1& v1, const T2& v2)
{
if constexpr (std::is_arithmetic_v<T1>) {
return v2 *= v1;
return T2{(double)v2 * v1};
} else if constexpr (std::is_arithmetic_v<T2>) {
return v1 *= v2;
return T1{(double)v1 * v2};
} else {
using res_t = std::conditional_t<std::convertible_to<T1, T2> && std::derived_from<T1, MccAngle>, T1, T2>;
return res_t{(double)v1 * (double)v2};
@@ -414,13 +414,14 @@ static auto operator*(const T1& v1, const T2& v2)
}
template <std::convertible_to<MccAngle> T1, typename T2>
static auto operator/(const T1& v1, const T2& v2)
static T1 operator/(const T1& v1, const T2& v2)
requires std::is_arithmetic_v<T2>
{
return v1 /= v2;
return (double)v1 / v2;
}
/* */
class MccAngleRA_ICRS : public MccAngle