# Complex.Phase プロパティ

## 定義

``````public:
property double Phase { double get(); };``````
``public double Phase { get; }``
``member this.Phase : double``
``Public ReadOnly Property Phase As Double``

## 例

``````using System;
using System.Numerics;

public class Example
{
public static void Main()
{
Complex c1 = Complex.FromPolarCoordinates(10, 45 * Math.PI / 180);
Console.WriteLine("{0}:", c1);
Console.WriteLine("   Magnitude: {0}", Complex.Abs(c1));
Console.WriteLine("   Phase      {0} degrees", c1.Phase * 180/Math.PI);
Console.WriteLine("   Atan(b/a): {0}", Math.Atan(c1.Imaginary/c1.Real));
}
}
// The example displays the following output:
//       (7.07106781186548, 7.07106781186547):
//          Magnitude: 10
//          Phase      45 degrees
//          Atan(b/a): 0.785398163397448
``````
``````Imports System.Numerics

Module Example
Public Sub Main()
Dim c1 As Complex = Complex.FromPolarCoordinates(10, 45 * Math.Pi / 180)
Console.WriteLine("{0}:", c1)
Console.WriteLine("   Magnitude: {0}", Complex.Abs(c1))
Console.WriteLine("   Phase      {0} degrees", c1.Phase * 180/Math.Pi)
Console.WriteLine("   Atan(b/a): {0}", Math.Atan(c1.Imaginary/c1.Real))
End Sub
End Module
' The example displays the following output:
'       (7.07106781186548, 7.07106781186547):
'          Magnitude: 10
'          Phase      45 degrees
'          Atan(b/a): 0.785398163397448
``````

## 注釈

FromPolarCoordinates メソッドを呼び出すことによって、デカルト座標ではなく極座標値に基づいて複素数をインスタンス化できます。You can instantiate a complex number based on its polar coordinates instead of its Cartesian coordinates by calling the FromPolarCoordinates method.

フェーズをラジアンから度に変換するには、180/Math.PIで乗算します。To convert the phase from radians to degrees, multiply it by 180/Math.PI.