public static bool ValueEqual(Value a, Value b) { if (a.Unit != b.Unit) { return(false); } if (a.Unit == ValueUnit.Undefined || a.Number.IsNaN() && b.Number.IsNaN()) { return(true); } return(NumberExtensions.FloatEqual(a.Number, b.Number)); }
/// <inheritdoc /> public bool Equals(LayoutEdges other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(NumberExtensions.FloatEqual(Left, other.Left) && NumberExtensions.FloatEqual(Top, other.Top) && NumberExtensions.FloatEqual(Right, other.Right) && NumberExtensions.FloatEqual(Bottom, other.Bottom) && NumberExtensions.FloatEqual(Start, other.Start) && NumberExtensions.FloatEqual(End, other.End)); }