コード例 #1
0
ファイル: GeodeticLine.cs プロジェクト: zhongshuiyuan/Geo
 public override int GetHashCode(SpatialEqualityOptions options)
 {
     unchecked
     {
         int hashCode = (Coordinate1 != null ? Coordinate1.GetHashCode(options) : 0);
         hashCode = (hashCode * 397) ^ (Coordinate2 != null ? Coordinate2.GetHashCode(options) : 0);
         hashCode = (hashCode * 397) ^ Distance.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing12.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing21.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
ファイル: GeodeticLine.cs プロジェクト: zhongshuiyuan/Geo
        public override bool Equals(object obj, SpatialEqualityOptions options)
        {
            var other = obj as GeodeticLine;

            return(!ReferenceEquals(null, other) && Equals(Coordinate1, other.Coordinate1, options) && Equals(Coordinate2, other.Coordinate2, options) && Distance.Equals(other.Distance) && Bearing12.Equals(other.Bearing12) && Bearing21.Equals(other.Bearing21));
        }