ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Maths.php
Go to the documentation of this file.
1 <?php
2 
18 function 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 }
$r
Definition: example_031.php:79
hypo($a, $b)
Pythagorean Theorem:.
Definition: Maths.php:18