示例#1
0
        public void EqualsAndHashCode_HaveConsistentResults(Point3d pt, Point3d pt2)
        {
            bool b1 = (pt == pt2);
            bool b2 = (pt.GetHashCode() == pt2.GetHashCode());

            Assert.True(b1 && b1 == b2);
        }
示例#2
0
        public void EqualsAndHashCode_HaveConsistentResults(Point3d pt, Point3d pt2)
        {
            var b1 = pt == pt2;
            var b2 = pt.GetHashCode() == pt2.GetHashCode();

            Assert.True(b1 && b1 == b2);
        }
示例#3
0
 public override int GetHashCode()
 {
     return(ImageSize.GetHashCode() ^
            FocalLength.GetHashCode() ^
            PrincipalPoint.GetHashCode() ^
            RadialDistortion.GetHashCode() ^
            TangentialDistortion.GetHashCode());
 }
示例#4
0
 /// <summary>
 /// Gets a non-unique hashing code for this entity.
 /// </summary>
 /// <returns>A particular number for a specific instance of plane.</returns>
 public override int GetHashCode()
 {
     // MSDN docs recommend XOR'ing the internal values to get a hash code
     return(m_origin.GetHashCode() ^ m_xaxis.GetHashCode() ^ m_yaxis.GetHashCode() ^ m_zaxis.GetHashCode());
 }
示例#5
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ pt.GetHashCode());
 }
示例#6
0
 /// <summary>
 /// Returns a hash code for this <see cref="Circle3d"/> structure.
 /// </summary>
 /// <returns>An integer value that specifies a hash value for this <see cref="Circle3d"/> structure.</returns>
 public override int GetHashCode()
 {
     return(Center.GetHashCode() ^ Radius.GetHashCode() ^ Normal.GetHashCode());
 }
示例#7
0
 public override int GetHashCode()
 {
     return(Rotation.GetHashCode() ^ Translation.GetHashCode());
 }