Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 /// <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));
 }