...
This commit is contained in:
11
mcc_utils.h
11
mcc_utils.h
@@ -247,6 +247,17 @@ static R rad2sxg(double ang, bool hms = false, int prec = 2)
|
||||
// round to given precision of arcseconds/seconds
|
||||
degs = std::round(degs * 3600.0 * term) / term / 3600.0;
|
||||
|
||||
if constexpr (NORM) {
|
||||
if (hms) {
|
||||
if (isEqual(degs, 24.0)) {
|
||||
degs = 0.0;
|
||||
}
|
||||
} else {
|
||||
if (isEqual(degs, 360.0)) {
|
||||
degs = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto d = std::trunc(degs);
|
||||
auto s = (degs - d) * 60.0;
|
||||
|
||||
Reference in New Issue
Block a user