CComplex.CFromPolarCoordinatesmethod
Returns the square root of the complex number z. The branch cut is the negative real axis. The result always lies in the right half of the complex plane. Example: DIM cpx AS CComplex = CComplex(2, 3) PRINT cpx.CSqrt Output: 1.67414922803554 +0.895977476129838 * i Compute the square root of -1: DIM cpx AS CComplex = CComplex(-1) PRINT cpx.CSqr Output: 0 +1.0 * i // Make a complex number from polar coordinates
Syntax
PRIVATE FUNCTION CComplex.CFromPolarCoordinates (BYVAL magnitude AS DOUBLE, BYVAL phase AS DOUBLE) AS CComplex
Parameters
| Name | Description | |
|---|---|---|
NET | 4.7 code: public static Complex FromPolarCoordinates(Double magnitude, Double phase) /* Factory method to take polar inputs and create a Complex object */ { return new Complex((magnitude * Math.Cos(phase)), (magnitude * Math.Sin(phase))); } |
Description
Returns the square root of the complex number z. The branch cut is the negative real axis. The result always lies in the right half of the complex plane. Example: DIM cpx AS CComplex = CComplex(2, 3) PRINT cpx.CSqrt Output: 1.67414922803554 +0.895977476129838 * i Compute the square root of -1: DIM cpx AS CComplex = CComplex(-1) PRINT cpx.CSqr Output: 0 +1.0 * i // Make a complex number from polar coordinates
Reference
- Include file
CComplex.inc - Defined in AfxNova/CComplex.inc:1035