public bool Equals(Tuple other)
 {
     return(DoubleComparer.Equal(this.X, other.X) &&
            DoubleComparer.Equal(this.Y, other.Y) &&
            DoubleComparer.Equal(this.Z, other.Z) &&
            DoubleComparer.Equal(this.W, other.W));
 }
        public bool Equals(Matrix other)
        {
            if (this.Rows != other.Rows ||
                this.Columns != other.Columns)
            {
                return(false);
            }

            for (var r = 0; r < this.Rows; r++)
            {
                for (var c = 0; c < this.Columns; c++)
                {
                    if (!DoubleComparer.Equal(this[r, c], other[r, c]))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
示例#3
0
 public bool Equals(Color other)
 {
     return(DoubleComparer.Equal(this.Red, other.Red) &&
            DoubleComparer.Equal(this.Green, other.Green) &&
            DoubleComparer.Equal(this.Blue, other.Blue));
 }