Complex.Atan(Complex) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回角度,這個角度是指定複數的反正切值。
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
複數。
傳回
角度為 value
的反正切值。
範例
下列範例說明 Atan 方法。 它會顯示將 Atan 方法傳回的值傳遞至 Tan 方法會傳回原始 Complex 值。
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)
open System.Numerics
let values =
[ Complex(2.5, 1.5)
Complex(2.5, -1.5)
Complex(-2.5, 1.5)
Complex(-2.5, -1.5) ]
for value in values do
printfn $"Tan(Atan({value})) = {Complex.Atan value |> Complex.Tan}"
// 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 方法。
Atan 方法會使用下列公式:
(ImaginaryOne / new Complex(2.0, 0.0)) * (Log(One - ImaginaryOne * value) - Log(One + ImaginaryOne * value))