floating point comparison
This commit is contained in:
parent
9f0d47ed59
commit
2b5dd91335
@ -21,8 +21,7 @@ public class Coordinates
|
||||
if (obj == null || obj.GetType() != this.GetType())
|
||||
return false;
|
||||
Coordinates convObj = (Coordinates)obj;
|
||||
// ReSharper disable twice CompareOfFloatsByEqualityOperator static values
|
||||
return convObj.latitude == this.latitude && convObj.longitude == this.longitude;
|
||||
return convObj.latitude.Equals(this.latitude) && convObj.longitude.Equals(longitude);
|
||||
}
|
||||
|
||||
public static ulong GetRegionHashCode(float latitude, float longitude)
|
||||
|
Loading…
Reference in New Issue
Block a user