ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
rho.php
Go to the documentation of this file.
1<?php
2
10namespace Complex;
11
20if (!function_exists(__NAMESPACE__ . '\\rho')) {
21 function rho($complex): float
22 {
23 $complex = Complex::validateComplexArgument($complex);
24
25 return \sqrt(
26 ($complex->getReal() * $complex->getReal()) +
27 ($complex->getImaginary() * $complex->getImaginary())
28 );
29 }
30}
An exception for terminatinating execution or to throw for unit testing.