rename short variable names in mercator to be more telling

This commit is contained in:
Dennis Luxen
2015-01-23 11:04:21 +01:00
parent bd1928e445
commit 0e7eff3963
3 changed files with 44 additions and 41 deletions
+4 -4
View File
@@ -29,12 +29,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cmath>
double mercator::y2lat(const double a)
double mercator::y2lat(const double value)
{
return 180. * M_1_PI * (2. * std::atan(std::exp(a * M_PI / 180.)) - M_PI_2);
return 180. * M_1_PI * (2. * std::atan(std::exp(value * M_PI / 180.)) - M_PI_2);
}
double mercator::lat2y(const double a)
double mercator::lat2y(const double latitude)
{
return 180. * M_1_PI * std::log(std::tan(M_PI_4 + a * (M_PI / 180.) / 2.));
return 180. * M_1_PI * std::log(std::tan(M_PI_4 + latitude * (M_PI / 180.) / 2.));
}
+2 -2
View File
@@ -30,9 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct mercator
{
static double y2lat(const double a);
static double y2lat(const double value);
static double lat2y(const double a);
static double lat2y(const double latitude);
};
#endif // MERCATOR_HPP