don't use certain STL functions

some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
This commit is contained in:
Konstantin Käfer
2015-08-03 15:01:35 +02:00
parent ab7456075c
commit 78ec33320f
34 changed files with 69 additions and 51 deletions

View File

@@ -101,7 +101,7 @@ void Transform::setLatLng(const LatLng latLng, const Duration& duration) {
}
const double m = 1 - 1e-15;
const double f = std::fmin(std::fmax(std::sin(util::DEG2RAD * latLng.latitude), -m), m);
const double f = ::fmin(::fmax(std::sin(util::DEG2RAD * latLng.latitude), -m), m);
double xn = -latLng.longitude * state.Bc;
double yn = 0.5 * state.Cc * std::log((1 + f) / (1 - f));
@@ -121,7 +121,7 @@ void Transform::setLatLngZoom(const LatLng latLng, const double zoom, const Dura
state.Cc = s / util::M2PI;
const double m = 1 - 1e-15;
const double f = std::fmin(std::fmax(std::sin(util::DEG2RAD * latLng.latitude), -m), m);
const double f = ::fmin(::fmax(std::sin(util::DEG2RAD * latLng.latitude), -m), m);
double xn = -latLng.longitude * state.Bc;
double yn = 0.5 * state.Cc * std::log((1 + f) / (1 - f));