/// <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()); }
public override int GetHashCode() { return(ImageSize.GetHashCode() ^ FocalLength.GetHashCode() ^ PrincipalPoint.GetHashCode() ^ RadialDistortion.GetHashCode() ^ TangentialDistortion.GetHashCode()); }
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); }
/// <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()); }