diff options
| author | Charles Karney <charles@karney.com> | 2015-08-13 13:11:58 -0400 |
|---|---|---|
| committer | Charles Karney <charles@karney.com> | 2015-08-13 13:11:58 -0400 |
| commit | 86b2155cf14a205951a41cc2ce8d574feedde03a (patch) | |
| tree | 09403834c66ba933fd7fa398c21841f4d046287d /src | |
| parent | 6c16367e152747133bba7a8fbcdbabef1232cd93 (diff) | |
| download | PROJ-86b2155cf14a205951a41cc2ce8d574feedde03a.tar.gz PROJ-86b2155cf14a205951a41cc2ce8d574feedde03a.zip | |
Fix the constants used for degree/radian conversions.
In dmstor.c an inaccurate constant was used for pi/180. This meant that
90deg converted to radians and back to degrees gave a result which was
larger than 90deg. The constant has been replaced by DEG_TO_RAD
(defined in proj_api.h).
In rtodms.c, the trailing digits in CONV were wrong; the constant has
been truncated so that all the digits are corrent.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dmstor.c | 2 | ||||
| -rw-r--r-- | src/rtodms.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dmstor.c b/src/dmstor.c index 62c06f3d..9665d5a9 100644 --- a/src/dmstor.c +++ b/src/dmstor.c @@ -11,7 +11,7 @@ static double proj_strtod(char *nptr, char **endptr); *sym = "NnEeSsWw"; static const double vm[] = { - .0174532925199433, + DEG_TO_RAD, .0002908882086657216, .0000048481368110953599 }; diff --git a/src/rtodms.c b/src/rtodms.c index abf6bc1c..591874a6 100644 --- a/src/rtodms.c +++ b/src/rtodms.c @@ -10,7 +10,7 @@ static double RES = 1000., RES60 = 60000., -CONV = 206264806.24709635515796003417; +CONV = 206264806.24709635516; static char format[50] = "%dd%d'%.3f\"%c"; static int |
