Ignore:
Timestamp:
2015-05-11T10:52:33+02:00 (11 years ago)
Author:
Don-vip
Message:

code style - Useless parentheses around expressions should be removed to prevent any misunderstanding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r8342 r8345  
    449449        CheckParameterUtil.ensureValidCoordinates(secondNode, "secondNode");
    450450
    451         double dy1 = (firstNode.getY() - commonNode.getY());
    452         double dy2 = (secondNode.getY() - commonNode.getY());
    453         double dx1 = (firstNode.getX() - commonNode.getX());
    454         double dx2 = (secondNode.getX() - commonNode.getX());
     451        double dy1 = firstNode.getY() - commonNode.getY();
     452        double dy2 = secondNode.getY() - commonNode.getY();
     453        double dx1 = firstNode.getX() - commonNode.getX();
     454        double dx2 = secondNode.getX() - commonNode.getX();
    455455
    456456        return dy1 * dx2 - dx1 * dy2 > 0;
     
    651651        dlat = lat2 - lat1;
    652652
    653         double a = (Math.pow(Math.sin(dlat/2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon/2), 2));
     653        double a = Math.pow(Math.sin(dlat/2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon/2), 2);
    654654        double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
    655655        return 6367000 * c;
     
    668668        dlat = lat2 - lat1;
    669669
    670         double a = (Math.pow(Math.sin(dlat/2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon/2), 2));
     670        double a = Math.pow(Math.sin(dlat/2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon/2), 2);
    671671        double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
    672672        return 6367000 * c;
Note: See TracChangeset for help on using the changeset viewer.