# Complex.MagnitudeComplex.MagnitudeComplex.MagnitudeComplex.Magnitude Property

## 定義

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

## 例

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

public class Example
{
public static void Main()
{
Complex complex1 = new Complex(2.0, 3.0);
Console.WriteLine("|{0}| = {1:N2}", complex1, Complex.Abs(complex1));
Console.WriteLine("Equal to Magnitude: {0}",
Complex.Abs(complex1).Equals(complex1.Magnitude));
}
}
// The example displays the following output:
//       |(2, 3)| = 3.60555127546399
//       Equal to Magnitude: True
``````
``````Imports System.Numerics

Module Example
Public Sub Main()
Dim complex1 As New Complex(2.0, 3.0)
Console.WriteLine("|{0}| = {1:N2}", complex1, Complex.Abs(complex1))
Console.WriteLine("Equal to Magnitude: {0}",
Complex.Abs(complex1).Equals(complex1.Magnitude))
End Sub
End Module
' The example displays the following output:
'       |(2, 3)| = 3.61
'       Equal to Magnitude: True
``````

## 注釈

Magnitudeプロパティは、複素数の絶対値に相当します。The Magnitude property is equivalent to the absolute value of a complex number. 複素数の値によって表される 2 次元のポイントを原点 (x 軸とデカルト座標系で y 軸の交点) からの距離が指定します。It specifies the distance from the origin (the intersection of the x-axis and the y-axis in the Cartesian coordinate system) to the two-dimensional point represented by a complex number. 絶対値は次のように計算されます。The absolute value is calculated as follows:

| a + bi | = Math.Sqrt(a * a + b * b)| a + bi | = Math.Sqrt(a * a + b * b)

このプロパティに、いずれかを返します絶対値の計算の結果、オーバーフローになる場合Double.PositiveInfinityまたはDouble.NegativeInfinityします。If the calculation of the absolute value results in an overflow, this property returns either Double.PositiveInfinity or Double.NegativeInfinity.

MagnitudePhaseプロパティは、極座標システム内の値から複素数を表すポイントの位置を定義します。The Magnitude and the Phase properties define the position of a point that represents a complex number in the polar coordinate system.