Help Center

CModfunction

Returns the modulus of a complex number.

Numeric DatatypesfunctionAfxComplex.incdocumented

Syntax

FUNCTION CMod (BYREF z AS _complex) AS DOUBLE
Also documented as CModulus — one description covers them all.

Description

Returns the modulus of a complex number.

Examples

DIM z AS _complex = (2.3, -4.5) print CModulus(z) Output: 5.053711507397311

DIM z AS _complex = CPolar(0.2938, -0.5434) print CModulus(z) Output: 0.2938

Reference

  • Include file AfxComplex.inc
  • Defined in AfxNova/AfxComplex.inc:1459
  • Documented in Numeric Datatypes/Complex Numbers Procedures.md
  • Topic: Complex Numbers Procedures