Converts the complex number to a double-precision real number.
Namespace:
Meta.NumericsAssembly: Meta.Numerics (in Meta.Numerics.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
| C# | Visual Basic | Visual C++ |
Parameters
- z
- Complex
The complex number to covert.
Return Value
The corresponding double-precision real number.
Remarks
This explicit cast will fail if the complex number has a non-zero imaginary part. If you just want to obtain the real part of a complex number, use the Re property.
Exceptions
| Exception | Condition |
|---|---|
| System..::.InvalidCastException | z.Im ≠ 0 |