Skip to content

Commit aa025c4

Browse files
author
MarkBaker
committed
Updates to the README document
1 parent 900857a commit aa025c4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ together with functions for
6464

6565
---
6666

67+
# Installation
68+
69+
```shell
70+
composer require markbaker/complex-functions:^1.0
71+
```
72+
73+
(Requires Composer version 2)
74+
6775
# Usage
6876

6977
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
@@ -124,7 +132,7 @@ echo Complex\add($complexString1, $complexString2);
124132
```
125133
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.
126134

127-
You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object.
135+
You can pass these arguments as Complex objects, or as an array, or a string that will parse to a complex object.
128136

129137
## Using functions
130138

@@ -151,7 +159,7 @@ $complexObject = new Complex\Complex($complexString);
151159
echo Complex\sinh($complexObject);
152160
```
153161

154-
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.
162+
When called procedurally using the function, or statically, you can pass in the argument as a Complex object, or as an array, or a string that will parse to a complex object.
155163
```php
156164
$complexString = '1.23-4.56i';
157165

0 commit comments

Comments
 (0)