示例#1
0
        /// <summary>
        /// Calculate the hashcode from the current values in this GeoVector.
        /// </summary>
        /// <returns>a hashcode</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17;
                hash = hash * 23 + DeltaLatitude.GetHashCode();
                hash = hash * 23 + DeltaLongitude.GetHashCode();

                return(hash);
            }
        }
示例#2
0
 /// <summary>
 /// Determine if a GeoVectors is equivalent with this one.  We compare down to 5 decimal places (~approximately 1m precision).
 /// </summary>
 /// <param name="other">the GeoVector being compared with</param>
 /// <returns>true if the two vectors are equivalent</returns>
 public bool Equals(GeoVector other)
 {
     return(DeltaLatitude.IsSameAs(other.DeltaLatitude, ArgumentUtils.DegreePrecision) &&
            DeltaLongitude.IsSameAs(other.DeltaLongitude, ArgumentUtils.DegreePrecision));
 }