summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/geo/core.h')
-rw-r--r--src/mongo/db/geo/core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/geo/core.h b/src/mongo/db/geo/core.h
index ca4b7138be7..9ca48d86dd0 100644
--- a/src/mongo/db/geo/core.h
+++ b/src/mongo/db/geo/core.h
@@ -42,8 +42,8 @@ namespace mongo {
inline double computeXScanDistance(double y, double maxDistDegrees) {
// TODO: this overestimates for large maxDistDegrees far from the equator
- return maxDistDegrees / min(cos(deg2rad(min(+89.0, y + maxDistDegrees))),
- cos(deg2rad(max(-89.0, y - maxDistDegrees))));
+ return maxDistDegrees / std::min(cos(deg2rad(std::min(+89.0, y + maxDistDegrees))),
+ cos(deg2rad(std::max(-89.0, y - maxDistDegrees))));
}
}