summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Wolf <alex.v.wolf@gmail.com>2022-05-25 20:55:15 +0700
committerAlexander V. Wolf <alex.v.wolf@gmail.com>2022-05-25 20:55:15 +0700
commitdd65fdf5a332d62834ac1cfe9639e220ea635c55 (patch)
tree727c47163a38e0bdc03daaab1900ebd3db6ab9d8
parent8afd39fef3079e77bc80d7736da148ebcc1f61dc (diff)
Fixed conversion tool radToHms(): avoiding possible negative zero for value of seconds (see #2460)
-rw-r--r--src/core/StelUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/StelUtils.cpp b/src/core/StelUtils.cpp
index 93a55ebb95..b03f55a68e 100644
--- a/src/core/StelUtils.cpp
+++ b/src/core/StelUtils.cpp
@@ -140,7 +140,7 @@ void radToHms(double angle, unsigned int& h, unsigned int& m, double& s)
h = static_cast<unsigned int>(angle);
m = static_cast<unsigned int>((angle-h)*60);
- s = (angle-h)*3600.-60.*m;
+ s = qAbs((angle-h)*3600.-60.*m);
}
/*************************************************************************