Changeset 18255 in josm for trunk/src


Ignore:
Timestamp:
2021-10-06T19:31:20+02:00 (3 years ago)
Author:
Don-vip
Message:

see #16472 - Fix coverity FB.FE_FLOATING_POINT_EQUALITY and FB.UG_SYNC_SET_UNSYNC_GET (patch by taylor.smock)

Location:
trunk/src/org/openstreetmap/josm/gui/util/imagery
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/imagery/CameraPlane.java

    r18246 r18255  
    183183    }
    184184
    185     public Vector3D getRotation() {
     185    public synchronized Vector3D getRotation() {
    186186        return this.rotation;
    187187    }
  • trunk/src/org/openstreetmap/josm/gui/util/imagery/Vector3D.java

    r18246 r18255  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.util.imagery;
     3
     4import org.openstreetmap.josm.tools.Utils;
    35
    46/**
     
    237239        if (o instanceof Vector3D) {
    238240            Vector3D other = (Vector3D) o;
    239             return this.x == other.x && this.y == other.y && this.z == other.z;
     241            return Utils.equalsEpsilon(this.x, other.x) && Utils.equalsEpsilon(this.y, other.y) && Utils.equalsEpsilon(this.z, other.z);
    240242        }
    241243        return false;
Note: See TracChangeset for help on using the changeset viewer.