Changeset 9117 in josm for trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
- Timestamp:
- 2015-12-13T22:48:40+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
r9116 r9117 25 25 26 26 /** 27 * Relative iteration precision used in the <code>mlfn< code> method27 * Relative iteration precision used in the <code>mlfn</code> method 28 28 */ 29 29 private static final double MLFN_TOL = 1E-11; … … 33 33 * {@link #en2}, {@link #en3}, {@link #en4}. 34 34 */ 35 private static final double C00 = 1.0,36 C02 = 0.25,37 C04 = 0.046875,38 C06 = 0.01953125,39 C08 = 0.01068115234375,40 C22 = 0.75,41 C44 = 0.46875,42 C46 = 0.01302083333333333333,43 C48 = 0.00712076822916666666,44 C66 = 0.36458333333333333333,45 C68 = 0.00569661458333333333,46 C88 = 0.3076171875;35 private static final double C00 = 1.0, 36 C02 = 0.25, 37 C04 = 0.046875, 38 C06 = 0.01953125, 39 C08 = 0.01068115234375, 40 C22 = 0.75, 41 C44 = 0.46875, 42 C46 = 0.01302083333333333333, 43 C48 = 0.00712076822916666666, 44 C66 = 0.36458333333333333333, 45 C68 = 0.00569661458333333333, 46 C88 = 0.3076171875; 47 47 48 48 /** 49 * Constant needed for the <code>mlfn< code> method.49 * Constant needed for the <code>mlfn</code> method. 50 50 * Setup at construction time. 51 51 */ 52 protected double en0, en1,en2,en3,en4;52 protected double en0, en1, en2, en3, en4; 53 53 54 54 /** 55 55 * The square of excentricity: e² = (a²-b²)/a² where 56 * <var>e</var> is the {@linkplain #excentricity excentricity},57 * <var>a</var> is the {@linkplain #semiMajor semi major}axis length and58 * <var>b</var> is the {@linkplain #semiMinor semi minor}axis length.56 * <var>e</var> is the excentricity, 57 * <var>a</var> is the semi major axis length and 58 * <var>b</var> is the semi minor axis length. 59 59 */ 60 60 protected double e2; … … 107 107 int i; 108 108 phi = arg; 109 for (i =MAXIMUM_ITERATIONS; true;) { // rarely goes over 5 iterations109 for (i = MAXIMUM_ITERATIONS; true;) { // rarely goes over 5 iterations 110 110 if (--i < 0) { 111 111 throw new RuntimeException("Too many iterations"); … … 122 122 123 123 public static double normalizeLon(double lon) { 124 if (lon >= - 124 if (lon >= -Math.PI && lon <= Math.PI) 125 125 return lon; 126 126 else {
Note:
See TracChangeset
for help on using the changeset viewer.