Complex.Atan(Complex) 方法

定义

返回表示指定复数的反正切的角度。Returns the angle that is the arc tangent of the specified complex number.

public:
 static System::Numerics::Complex Atan(System::Numerics::Complex value);
public static System.Numerics.Complex Atan (System.Numerics.Complex value);
static member Atan : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Function Atan (value As Complex) As Complex

参数

value
Complex

一个复数。A complex number.

返回

表示 value 的反正切值的角度。The angle that is the arc tangent of value.

示例

下面的示例演示 Atan 方法。The following example illustrates the Atan method. 它显示将 Atan 方法返回的值传递到 Tan 方法返回原始 Complex 值。It shows that passing the value returned by the Atan method to the Tan method returns the original Complex value.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(2.5, 1.5), 
                           new Complex(2.5, -1.5), 
                           new Complex(-2.5, 1.5), 
                           new Complex(-2.5, -1.5) };
      foreach (Complex value in values)
         Console.WriteLine("Tan(Atan({0})) = {1}", 
                            value, Complex.Tan(Complex.Atan(value)));
   }
}
// The example displays the following output:
//       Tan(Atan((2.5, 1.5))) = (2.5, 1.5)
//       Tan(Atan((2.5, -1.5))) = (2.5, -1.5)
//       Tan(Atan((-2.5, 1.5))) = (-2.5, 1.5)
//       Tan(Atan((-2.5, -1.5))) = (-2.5, -1.5)
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim values() As Complex = { New Complex(2.5, 1.5), 
                                  New Complex(2.5, -1.5), 
                                  New Complex(-2.5, 1.5), 
                                  New Complex(-2.5, -1.5) }
      For Each value As Complex In values
         Console.WriteLine("Tan(Atan({0})) = {1}", 
                            value, Complex.Tan(Complex.Atan(value)))
      Next                               
   End Sub
End Module
' The example displays the following example:
'       Tan(Atan((2.5, 1.5))) = (2.5, 1.5)
'       Tan(Atan((2.5, -1.5))) = (2.5, -1.5)
'       Tan(Atan((-2.5, 1.5))) = (-2.5, 1.5)
'       Tan(Atan((-2.5, -1.5))) = (-2.5, -1.5)

注解

复数的 Atan 方法对应于实数的 Math.Atan 方法。The Atan method for complex numbers corresponds to the Math.Atan method for real numbers.

Atan 方法使用以下公式:The Atan method uses the following formula:

ImaginaryOne/new Complex (2.0,0.0)) * (LogOne - ImaginaryOne * 值)-LogOne + ImaginaryOne * 值))(ImaginaryOne / new Complex(2.0, 0.0)) * (Log(One - ImaginaryOne * value) - Log(One + ImaginaryOne * value))

适用于

另请参阅