/// <summary>
 /// Serves as a hash function for the PolylineSegment type.
 /// </summary>
 /// <returns>A hash code for the current PolylineSegemnt.</returns>
 public override int GetHashCode()
 {
     return(_startPoint.GetHashCode() ^
            _endPoint.GetHashCode() ^
            _bulge.GetHashCode() ^
            _startWidth.GetHashCode() ^
            _endWidth.GetHashCode());
 }
示例#2
0
 public override int GetHashCode()
 {
     return(ImageSize.GetHashCode() ^
            FocalLength.GetHashCode() ^
            PrincipalPoint.GetHashCode() ^
            RadialDistortion.GetHashCode() ^
            TangentialDistortion.GetHashCode());
 }
示例#3
0
        public void EqualsAndHashCode_HaveConsistentResults()
        {
            var pt  = new Point2d(1.00000009, -1);
            var pt2 = new Point2d(1, -1);
            var b1  = pt == pt2;
            var b2  = pt.GetHashCode() == pt2.GetHashCode();

            Assert.True(b1 && b1 == b2);
        }
示例#4
0
 /// <summary>
 /// Returns a hash code for this <see cref="Ellipse"/> structure.
 /// </summary>
 /// <returns>An integer value that specifies a hash value for this <see cref="Ellipse"/> structure.</returns>
 public override int GetHashCode()
 {
     return(Center.GetHashCode() ^ Angle.GetHashCode() ^ Axes.GetHashCode());
 }