AForge.Math.Complex.Sin C# (CSharp) Method

Sin() public static method

Calculates Sine value of the complex number.
public static Sin ( Complex a ) : Complex
a Complex A instance.
return Complex
        public static Complex Sin(Complex a)
        {
            Complex result = Zero;

            if (a.Im == 0.0)
            {
                result.Re = System.Math.Sin(a.Re);
                result.Im = 0.0;
            }
            else
            {
                result.Re = System.Math.Sin(a.Re)*System.Math.Cosh(a.Im);
                result.Im = System.Math.Cos(a.Re)*System.Math.Sinh(a.Im);
            }

            return result;
        }