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)); } }
public bool Equals(TorqueUnit other) { return(LeftUnit.Equals(other.LeftUnit) && RightUnit.Equals(other.RightUnit)); }
public bool Equals(MassDetlaKelvinUnit other) { return(LeftUnit.Equals(other.LeftUnit) && RightUnit.Equals(other.RightUnit)); }