Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MAZ01001 committed Jul 28, 2024
1 parent 816bb98 commit d158dfe
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,10 @@ Scroll [UP](#vectorjs "Scroll to start of section: Vector.js")
- assume first entry is the "positive" root ie. principal root

```javascript
new ComplexNumber(2,0).pow(-4).roots(-4).next().value
?.roundEpsilon().toString()??"no root";
"2+0i";

[...new ComplexNumber(2,0).pow(-4).roots(-4)]
.map(v=>v.roundEpsilon().toString());
["2+0i", "0+2i", "-2+0i", "0-2i"];
new ComplexNumber(2,0).pow(-4).roots(-4).next().value?.roundEpsilon().toString()??"no root";
//=> "2+0i"
[...new ComplexNumber(2,0).pow(-4).roots(-4)].map(v=>v.roundEpsilon().toString());
//=> ["2+0i", "0+2i", "-2+0i", "0-2i"]
```
the class and its prototype are immutable!
Expand Down

0 comments on commit d158dfe

Please sign in to comment.