Complex::Abs Method (Complex)
.NET Framework (current version)
Gets the absolute value (or magnitude) of a complex number.
Assembly: System.Numerics (in System.Numerics.dll)
Parameters
- value
-
Type:
System.Numerics::Complex
A complex number.
The absolute value of a complex number is equivalent to its Magnitude property. The absolute value of a real number a + bi is calculated as follows:
If b = 0, the result is 0.
If a > b, the result is a *Math::Sqrt(1 + b2/a2).
If b > a, the result is b * Math::Sqrt(1 + a2/b2).
If the calculation of the absolute value results in an overflow, the method returns either Double::PositiveInfinity or Double::NegativeInfinity. If either the Real or Imaginary property is Double::NaN and the other property is neither Double::PositiveInfinity nor Double::NegativeInfinity, the method returns Double::NaN.
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
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
Show: