Ticket #25134: #25134-Fix-Sonar-issues-in-Geometry.patch

File #25134-Fix-Sonar-issues-in-Geometry.patch, 551 bytes (added by DanProgs <Abenteurer.2901@…>, 11 days ago)
  • src/org/openstreetmap/josm/tools/Geometry.java

    ### Eclipse Workspace Patch 1.0
    #P josm
    diff --git src/org/openstreetmap/josm/tools/Geometry.java src/org/openstreetmap/josm/tools/Geometry.java
    index 1542c9b..1025db8 100644
     
    10781078        }
    10791079        // (At.A)^-1 = [invij]
    10801080        final double det = a11*a22 - a12*a12;
    1081         if (Math.abs(det) < 1e-5) {
     1081        if (det == 0 || Math.abs(det) < 1e-5) {
    10821082            return null;
    10831083        }
    10841084        final double inv11 = a22/det;