Changeset 13868 in josm


Ignore:
Timestamp:
2018-05-29T02:21:47+02:00 (6 years ago)
Author:
Don-vip
Message:

spotbugs - DLS_DEAD_LOCAL_STORE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r13434 r13868  
    7575public class NavigatableComponent extends JComponent implements Helpful {
    7676
     77    private static final double ALIGNMENT_EPSILON = 1e-3;
     78
    7779    /**
    7880     * Interface to notify listeners of the change of the zoom area.
     
    672674        // as a result of the alignment, it is common to round "half integer" values
    673675        // like 1.49999, which is numerically unstable; add small epsilon to resolve this
    674         final double epsilon = 1e-3;
    675676        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);
    678679        EastNorth enShift = mvs.getForView(enOriginAligned.getX(), enOriginAligned.getY()).getEastNorth();
    679680        newCenter = newCenter.subtract(enShift);
Note: See TracChangeset for help on using the changeset viewer.