public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Packing != null) { hashCode = hashCode * 59 + Packing.GetHashCode(); } if (SquarifyRatio != null) { hashCode = hashCode * 59 + SquarifyRatio.GetHashCode(); } if (Flip != null) { hashCode = hashCode * 59 + Flip.GetHashCode(); } if (Pad != null) { hashCode = hashCode * 59 + Pad.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Tiling other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Packing == other.Packing || Packing != null && Packing.Equals(other.Packing) ) && ( SquarifyRatio == other.SquarifyRatio || SquarifyRatio != null && SquarifyRatio.Equals(other.SquarifyRatio) ) && ( Flip == other.Flip || Flip != null && Flip.Equals(other.Flip) ) && ( Pad == other.Pad || Pad != null && Pad.Equals(other.Pad) )); }