Help Center
Help Center›AfxNova

CFromPolarCoordinatesfunction

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 z AS _complex = (2, 3) z = CSqr(z) PRINT CStr(z) Output: 1.67414922803554 +0.895977476129838 * i Compute the square root of -1: DIM z AS _complex = (-1) z = CSqr(z) PRINT CStr(z) Output: 0 +1.0 * i // Make a complex number from polar coordinates

Numeric DatatypesfunctionAfxComplex.incundocumented
Not documented upstream. This symbol was found in the AfxNova source but appears in no documentation topic. The signature below is read directly from the code; any description comes from the source comments.

Syntax

PRIVATE FUNCTION CFromPolarCoordinates (BYVAL magnitude AS DOUBLE, BYVAL phase AS DOUBLE) AS _complex

Parameters

NameDescription
NET4.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 z AS _complex = (2, 3) z = CSqr(z) PRINT CStr(z) Output: 1.67414922803554 +0.895977476129838 * i Compute the square root of -1: DIM z AS _complex = (-1) z = CSqr(z) PRINT CStr(z) Output: 0 +1.0 * i // Make a complex number from polar coordinates

Reference

  • Include file AfxComplex.inc
  • Defined in AfxNova/AfxComplex.inc:669