vendor/markbaker/complex/classes/src/functionsabs.php

Function code for the complex abs() function

Functions

abs()

abs(\Complex\Complex|mixed  $complex) : float

Returns the absolute value (modulus) of a complex number.

Also known as the rho of the complex number, i.e. the distance/radius from the centrepoint to the representation of the number in polar coordinates.

This function is a synonym for rho()

Parameters

\Complex\Complex|mixed $complex

Complex number or a numeric value.

Throws

\Complex\Exception

If argument isn't a valid real or complex number.

Returns

float —

The absolute (or rho) value of the complex argument.