You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you've previously been using procedural calls to functions and operations using this library, then from version 3.0 you should use [MarkBaker/PHPComplexFunctions](https://github.com/MarkBaker/PHPComplexFunctions) instead (available on packagist as [markbaker/complex-functions](https://packagist.org/packages/markbaker/complex-functions)).
77
+
78
+
You'll need to replace `markbaker/complex`in your `composer.json` file with the new library, but otherwise there should be no difference in the namespacing, or in the way that you have called the Complex functions in the past, so no actual code changes are required.
79
+
80
+
```shell
81
+
composer require markbaker/complex-functions:^1.0
82
+
```
83
+
84
+
You should not reference this library (`markbaker/complex`) in your `composer.json`, composer wil take care of that for you.
85
+
68
86
# Usage
69
87
70
88
To create a new complex object, you can provide either the real, imaginary and suffix parts as individual values, or as an array of values passed passed to the constructor; or a string representing the value. e.g
If you want to perform the same operation against multiple values (e.g. to add three or more complex numbers), then you can pass multiple arguments to any of the operations.
119
137
120
-
You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object.
138
+
You can pass these arguments as Complex objects, or as an array, or string that will parse to a complex object.
As with operations, you can pass these arguments as Complex objects, or as an array or string that will parse to a complex object.
157
+
138
158
139
159
In the case of the `pow()` function (the only implemented function that requires an additional argument) you need to pass both arguments when calling the function
0 commit comments