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
Copy file name to clipboardExpand all lines: README.md
+2-97Lines changed: 2 additions & 97 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,103 +14,8 @@ Use the package manager [pip](https://pypi.org/project/cmpx/) to install cmpx.
14
14
pip install cmpx
15
15
```
16
16
17
-
## Usage
18
-
### Importing Complex class
19
-
```python
20
-
from cmpx import Complex
21
-
```
22
-
### Different instanciations of Complex class
23
-
```python
24
-
# Instanciation 1
25
-
number = Complex() # --> Real = 0, Imaginary = 0
26
-
print(number)
27
-
# Instanctiation 2
28
-
number = Complex(42) # --> Real = 42, Imaginary = 0
29
-
print(number)
30
-
# Instanciation 3
31
-
number = Complex(12, -3.2) # --> Real = 12, Imaginary = -3.2
32
-
print(number)
33
-
# Instanciation 4
34
-
number = Complex(im=13.2, re=5) # --> Real = 5, Imaginary = 13.2
35
-
print(number)
36
-
# Instanciation 5
37
-
number = Complex(re=3, im=-2.4, restore=False) # restore argument is by default True, whenever an error occurs on operation, the last result will be restored to the object, else if it is False then the object will be simply None.
38
-
# Instanciation 6
39
-
number = Complex.fromComplex(4-3j-2) # Real = 2, Imaginary = -3
40
-
# Keep in mind that the imaginary part 'j' must be always multiplied with a coefficient as follows
0 commit comments