Changeset 13868 in josm
- Timestamp:
- 2018-05-29T02:21:47+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r13434 r13868 75 75 public class NavigatableComponent extends JComponent implements Helpful { 76 76 77 private static final double ALIGNMENT_EPSILON = 1e-3; 78 77 79 /** 78 80 * Interface to notify listeners of the change of the zoom area. … … 672 674 // as a result of the alignment, it is common to round "half integer" values 673 675 // like 1.49999, which is numerically unstable; add small epsilon to resolve this 674 final double epsilon = 1e-3;675 676 Point2D enOriginAligned = new Point2D.Double( 676 Math.round(enOrigin.getX()) + epsilon,677 Math.round(enOrigin.getY()) + epsilon);677 Math.round(enOrigin.getX()) + ALIGNMENT_EPSILON, 678 Math.round(enOrigin.getY()) + ALIGNMENT_EPSILON); 678 679 EastNorth enShift = mvs.getForView(enOriginAligned.getX(), enOriginAligned.getY()).getEastNorth(); 679 680 newCenter = newCenter.subtract(enShift);
Note:
See TracChangeset
for help on using the changeset viewer.