Encog.MathUtil.ComplexNumber.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : String
return String
        public new String ToString()
        {
            if (_x != 0 && _y > 0)
            {
                return _x + " + " + _y + "i";
            }
            if (_x != 0 && _y < 0)
            {
                return _x + " - " + (-_y) + "i";
            }
            if (_y == 0)
            {
                return Format.FormatDouble(_x, 4);
            }
            if (_x == 0)
            {
                return _y + "i";
            }
            // shouldn't get here (unless Inf or NaN)
            return _x + " + i*" + _y;
        }
    }