Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Complex::FromPolarCoordinates Method (Double, Double)

 

Creates a complex number from a point's polar coordinates.

Namespace:   System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public:
static Complex FromPolarCoordinates(
	double magnitude,
	double phase
)

Parameters

magnitude
Type: System::Double

The magnitude, which is the distance from the origin (the intersection of the x-axis and the y-axis) to the number.

phase
Type: System::Double

The phase, which is the angle from the line to the horizontal axis, measured in radians.

Return Value

Type: System.Numerics::Complex

A complex number.

The FromPolarCoordinates method instantiates a complex number based on its polar coordinates.

Because there are multiple representations of a point on a complex plane, the return value of the FromPolarCoordinates method is normalized. The magnitude is normalized to a positive number, and the phase is normalized to a value in the range of -PI to PI. As a result, the values of the Phase and Magnitude properties of the resulting complex number may not equal the original values of the magnitude and phase parameters.

To convert a value from degrees to radians for the phase parameter, multiply it by Math::PI/180.

The following example uses the FromPolarCoordinates method to instantiate a complex number based on its polar coordinates and then displays the value of its Magnitude and Phase properties.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft