Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((LeftUnit.GetHashCode() * 397) ^ RightUnit.GetHashCode());
     }
 }
            public bool IsBalanced()
            {
                int LeftHeight = LeftUnit != null?LeftUnit.Height() : 0;

                int RightHeight = RightUnit != null?RightUnit.Height() : 0;

                int heightDifference = LeftHeight - RightHeight;

                if (Math.Abs(heightDifference) > 1)
                {
                    return(false);
                }
                else
                {
                    return((LeftUnit != null ? LeftUnit.IsBalanced() : true) && (RightUnit != null ? RightUnit.IsBalanced() : true));
                }
            }
Ejemplo n.º 3
0
 public bool Equals(TorqueUnit other)
 {
     return(LeftUnit.Equals(other.LeftUnit) && RightUnit.Equals(other.RightUnit));
 }
Ejemplo n.º 4
0
 public bool Equals(MassDetlaKelvinUnit other)
 {
     return(LeftUnit.Equals(other.LeftUnit) && RightUnit.Equals(other.RightUnit));
 }