Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401] [Versions 401 and 403]

(no description)

File Size: 121 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Complex:: (3 methods):
  COMPLEX()
  IMAGINARY()
  IMREAL()


Class: Complex  - X-Ref

COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i')   X-Ref
COMPLEX.

Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj.

Excel Function:
COMPLEX(realNumber,imaginary[,suffix])

param: mixed $realNumber the real float coefficient of the complex number
param: mixed $imaginary the imaginary float coefficient of the complex number
param: mixed $suffix The character suffix for the imaginary component of the complex number.
return: array|string

IMAGINARY($complexNumber)   X-Ref
IMAGINARY.

Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.

Excel Function:
IMAGINARY(complexNumber)

param: array|string $complexNumber the complex number for which you want the imaginary
return: array|float|string (string if an error)

IMREAL($complexNumber)   X-Ref
IMREAL.

Returns the real coefficient of a complex number in x + yi or x + yj text format.

Excel Function:
IMREAL(complexNumber)

param: array|string $complexNumber the complex number for which you want the real coefficient
return: array|float|string (string if an error)