xFunc.Maths.Tokens.ComplexNumberToken.Equals C# (CSharp) Method

Equals() public method

Determines whether the specified System.Object, is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
return bool
        public override bool Equals(object obj)
        {
            var num = obj as ComplexNumberToken;
            if (num == null)
                return false;

            return complex.Equals(num.complex);
        }

Usage Example

Example #1
0
        public void EqualsSameObjectTest()
        {
            var token = new ComplexNumberToken(new Complex(5.3, 2.1));

            Assert.True(token.Equals(token));
            Assert.Equal(token, token);
        }
All Usage Examples Of xFunc.Maths.Tokens.ComplexNumberToken::Equals