PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.0.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.0.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpexcel / Classes / PHPExcel / Shared / JAMA / utils / Maths.php

Maths.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.0.10, at vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Maths.php

44 lines 711 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package JAMA
4 *
5 * Pythagorean Theorem:
6 *
7 * a = 3
8 * b = 4
9 * r = sqrt(square(a) + square(b))
10 * r = 5
11 *
12 * r = sqrt(a^2 + b^2) without under/overflow.
13 */
14 function hypo($a, $b) {
15 if (abs($a) > abs($b)) {
16 $r = $b / $a;
17 $r = abs($a) * sqrt(1 + $r * $r);
18 } elseif ($b != 0) {
19 $r = $a / $b;
20 $r = abs($b) * sqrt(1 + $r * $r);
21 } else {
22 $r = 0.0;
23 }
24 return $r;
25 } // function hypo()
26
27
28 /**
29 * Mike Bommarito's version.
30 * Compute n-dimensional hyotheneuse.
31 *
32 function hypot() {
33 $s = 0;
34 foreach (func_get_args() as $d) {
35 if (is_numeric($d)) {
36 $s += pow($d, 2);
37 } else {
38 throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException));
39 }
40 }
41 return sqrt($s);
42 }
43 */
44