PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.3.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.3.2
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 3.10.4 All 148 releases
visualizer / vendor / markbaker / complex / examples / testOperations.php

testOperations.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.3.2, at vendor/markbaker/complex/examples/testOperations.php

35 lines 559 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use Complex\Complex as Complex;
4
5 include('../classes/Bootstrap.php');
6
7 $values = [
8 new Complex(123),
9 new Complex(456, 123),
10 new Complex(0.0, 456),
11 ];
12
13 foreach ($values as $value) {
14 echo $value, PHP_EOL;
15 }
16
17 echo 'Addition', PHP_EOL;
18
19 $result = \Complex\add(...$values);
20 echo '=> ', $result, PHP_EOL;
21
22 echo PHP_EOL;
23
24 echo 'Subtraction', PHP_EOL;
25
26 $result = \Complex\subtract(...$values);
27 echo '=> ', $result, PHP_EOL;
28
29 echo PHP_EOL;
30
31 echo 'Multiplication', PHP_EOL;
32
33 $result = \Complex\multiply(...$values);
34 echo '=> ', $result, PHP_EOL;
35