...
This commit is contained in:
@@ -3,11 +3,6 @@
|
||||
#include "mcc_traits.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
|
||||
/* MCC-LIBRARY COORDINATES REPRESENTATION DEFINITIONS AND CLASS */
|
||||
|
||||
constexpr double operator""_rads(long double val) // angle in radians (no conversion)
|
||||
{
|
||||
return val;
|
||||
@@ -20,7 +15,7 @@ constexpr double operator""_degs(long double val) // angle in degrees
|
||||
|
||||
constexpr double operator""_dms(const char* s, size_t size) // as a string "DEGREES:MINUTES:SECONDS"
|
||||
{
|
||||
auto res = utils::parsAngleString(std::span{s, size});
|
||||
auto res = mcc::utils::parsAngleString(std::span{s, size});
|
||||
if (res.has_value()) {
|
||||
return res.value() * std::numbers::pi / 180.0;
|
||||
} else {
|
||||
@@ -28,9 +23,9 @@ constexpr double operator""_dms(const char* s, size_t size) // as a string "DEG
|
||||
}
|
||||
}
|
||||
|
||||
constexpr double operator""_hms(const char* s, size_t size) // as a string "HOURS:MINUTES:SECONDS"
|
||||
constexpr double operator""_hms(const char* s, size_t len) // as a string "HOURS:MINUTES:SECONDS"
|
||||
{
|
||||
auto res = utils::parsAngleString(std::span{s, size}, true);
|
||||
auto res = mcc::utils::parsAngleString(std::span{s, len}, true);
|
||||
if (res.has_value()) {
|
||||
return res.value() * std::numbers::pi / 180.0;
|
||||
} else {
|
||||
@@ -39,6 +34,13 @@ constexpr double operator""_hms(const char* s, size_t size) // as a string "HOU
|
||||
}
|
||||
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
|
||||
/* MCC-LIBRARY COORDINATES REPRESENTATION DEFINITIONS AND CLASS */
|
||||
|
||||
|
||||
|
||||
// tags for MccCoordinate class construction
|
||||
|
||||
struct MccRadianTag {
|
||||
|
||||
Reference in New Issue
Block a user