Ignore:
Timestamp:
2015-05-18T22:57:22+02:00 (9 years ago)
Author:
Don-vip
Message:

see #11447 - partial revert of r8384

Location:
trunk/src/org/openstreetmap/josm/data
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java

    r8384 r8393  
    295295                        double C = -A * rx - B * ry;
    296296                        double RSsq = A * A + B * B;
    297                         if (Double.doubleToRawLongBits(RSsq) == 0) {
     297                        if (RSsq == 0) {
    298298                            continue;
    299299                        }
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r8390 r8393  
    948948    public String getToolbarName() {
    949949        String res = name;
    950         if (Double.doubleToRawLongBits(pixelPerDegree) != 0) {
     950        if (pixelPerDegree != 0) {
    951951            res += "#PPD="+pixelPerDegree;
    952952        }
     
    956956    public String getMenuName() {
    957957        String res = name;
    958         if (Double.doubleToRawLongBits(pixelPerDegree) != 0) {
     958        if (pixelPerDegree != 0) {
    959959            res += " ("+pixelPerDegree+")";
    960960        }
  • trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java

    r8384 r8393  
    7171        res.add(String.valueOf(dx));
    7272        res.add(String.valueOf(dy));
    73         if (Double.doubleToRawLongBits(centerX) != 0 || Double.doubleToRawLongBits(centerY) != 0) {
     73        if (centerX != 0 || centerY != 0) {
    7474            res.add(String.valueOf(centerX));
    7575            res.add(String.valueOf(centerY));
  • trunk/src/org/openstreetmap/josm/data/osm/BBox.java

    r8384 r8393  
    274274        if (o instanceof BBox) {
    275275            BBox b = (BBox)o;
    276             return Utils.equalsEpsilon(b.xmax, xmax) && Utils.equalsEpsilon(b.ymax, ymax)
    277                     && Utils.equalsEpsilon(b.xmin, xmin) && Utils.equalsEpsilon(b.ymin, ymin);
     276            return b.xmax == xmax && b.ymax == ymax
     277                    && b.xmin == xmin && b.ymin == ymin;
    278278        } else
    279279            return false;
  • trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java

    r8384 r8393  
    2626            return -1;
    2727        double dLon = n1.getCoor().lon() - n2.getCoor().lon();
    28         if (Double.doubleToRawLongBits(dLon) == 0)
     28        if (dLon == 0)
    2929            return 0;
    3030        return dLon > 0 ? 1 : -1;
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8384 r8393  
    142142            double lenNext = Math.sqrt(dxNext*dxNext + dyNext*dyNext);
    143143
    144             if (Double.doubleToRawLongBits(lenNext) == 0) {
     144            if (lenNext == 0) {
    145145                lenNext = 1; // value does not matter, because dy_next and dx_next is 0
    146146            }
     
    998998
    999999        double fromAngle;
    1000         if (Double.doubleToRawLongBits(dx) == 0) {
     1000        if (dx == 0) {
    10011001            fromAngle = Math.PI/2;
    10021002        } else {
     
    13151315                    if (showHeadArrowOnly ? !it.hasNext() : showOrientation) {
    13161316                        final double segmentLength = p1.distance(p2);
    1317                         if (Double.doubleToRawLongBits(segmentLength) != 0) {
     1317                        if (segmentLength != 0) {
    13181318                            final double l =  (10. + line.getLineWidth()) / segmentLength;
    13191319
     
    13281328                    if (showOneway) {
    13291329                        final double segmentLength = p1.distance(p2);
    1330                         if (Double.doubleToRawLongBits(segmentLength) != 0) {
     1330                        if (segmentLength != 0) {
    13311331                            final double nx = (p2.x - p1.x) / segmentLength;
    13321332                            final double ny = (p2.y - p1.y) / segmentLength;
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r8390 r8393  
    342342        boolean isCentric = true;
    343343        for (Double param : towgs84Param) {
    344             if (Double.doubleToRawLongBits(param) != 0) {
     344            if (param != 0) {
    345345                isCentric = false;
    346346                break;
     
    351351        boolean is3Param = true;
    352352        for (int i = 3; i<towgs84Param.size(); i++) {
    353             if (Double.doubleToRawLongBits(towgs84Param.get(i)) != 0) {
     353            if (towgs84Param.get(i) != 0) {
    354354                is3Param = false;
    355355                break;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r8384 r8393  
    5959                if (coor == null)
    6060                    return null;
    61                 if (Double.doubleToRawLongBits(precision) == 0)
     61                if (precision == 0)
    6262                    return coor.getRoundedToOsmPrecision();
    6363                return roundCoord(coor);
     
    6666                if (coor == null)
    6767                    return null;
    68                 if (Double.doubleToRawLongBits(precision) == 0)
     68                if (precision == 0)
    6969                    return coor.getRoundedToOsmPrecision();
    7070                return roundCoord(coor);
Note: See TracChangeset for help on using the changeset viewer.