ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Maths.php
Go to the documentation of this file.
1<?php
2
18function hypo($a, $b)
19{
20 if (abs($a) > abs($b)) {
21 $r = $b / $a;
22 $r = abs($a) * sqrt(1 + $r * $r);
23 } elseif ($b != 0) {
24 $r = $a / $b;
25 $r = abs($b) * sqrt(1 + $r * $r);
26 } else {
27 $r = 0.0;
28 }
29
30 return $r;
31}
hypo($a, $b)
Pythagorean Theorem:.
Definition: Maths.php:18
An exception for terminatinating execution or to throw for unit testing.
$r
Definition: example_031.php:79