This commit is contained in:
Timur A. Fatkhullin
2026-02-18 00:08:19 +03:00
parent 408d23c376
commit 2f80bcc78b

View File

@@ -68,7 +68,7 @@ constexpr static std::string_view trimSpaces(const char* r, TrimType type = Trim
}
template <typename T, std::ranges::contiguous_range R>
std::optional<T> numFromStr(R&& r)
static std::optional<T> numFromStr(R&& r)
requires((std::integral<T> || std::floating_point<T>) &&
std::same_as<char, std::remove_cvref_t<std::ranges::range_value_t<R>>>)
{
@@ -340,7 +340,10 @@ static std::string AZZD_rad2sxg(double az, double zd, std::string_view delim = "
// "12:43:23.423, 102:43:12.124"
// " 12.3453467, 102:43:12.124 "
template <mcc::traits::mcc_input_char_range R>
std::pair<double, double> parseAnglePair(R&& str, bool hms1 = false, bool hms2 = false, std::string_view delim = ",")
static std::pair<double, double> parseAnglePair(R&& str,
bool hms1 = false,
bool hms2 = false,
std::string_view delim = ",")
{
std::pair<double, double> res{std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()};
auto found1 = std::ranges::search(std::forward<R>(str), delim);
@@ -382,7 +385,10 @@ std::pair<double, double> parseAnglePair(R&& str, bool hms1 = false, bool hms2 =
// 1st element: difference along co-latitude axis
// 2nd element: distance
std::tuple<double, double, double> distanceOnSphere(double co_lon1, double co_lat1, double co_lon2, double co_lat2)
static std::tuple<double, double, double> distanceOnSphere(double co_lon1,
double co_lat1,
double co_lon2,
double co_lat2)
{
std::tuple<double, double, double> res{};