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
Discard all usage of direct calls to the namespaced functions, because I'm so f***ing p***ed off with people complaining about the entries that they require in composer.json, and telling me how I'm making the world burn, and deliberately making the interwebz slow. Direct procedural access to functions and operations is being moved to a separate library, which will have this library as a dependency (more details to follow once I've created it and put all the documentation in place).
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.
125
117
126
118
You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object.
or you can call the function as you would in procedural code, passing the Complex object as an argument
146
-
```php
147
-
$complexString = '1.23-4.56i';
148
-
149
-
$complexObject = new Complex\Complex($complexString);
150
-
echo Complex\sinh($complexObject);
151
-
```
152
-
153
-
When called procedurally using the function, you can pass in the argument as a Complex object, or as an array or string that will parse to a complex object.
154
-
```php
155
-
$complexString = '1.23-4.56i';
156
-
157
-
echo Complex\sinh($complexString);
158
-
```
159
-
160
-
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 procedurally
137
+
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
161
138
162
139
```php
163
140
$complexString = '1.23-4.56i';
164
141
165
142
$complexObject = new Complex\Complex($complexString);
166
-
echo Complex\pow($complexObject, 2);
143
+
echo Complex\Functions::pow($complexObject, 2);
167
144
```
168
145
or pass the additional argument when calling the method
0 commit comments