Skip to content

Commit 0199715

Browse files
authored
docs: restore removed copy
Signed-off-by: Athan <[email protected]>
1 parent 949dde6 commit 0199715

File tree

1 file changed

+15
-0
lines changed
  • lib/node_modules/@stdlib/assert/is-almost-equal

1 file changed

+15
-0
lines changed

lib/node_modules/@stdlib/assert/is-almost-equal/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ bool = isAlmostEqual( z1, z2, 1 );
7171
// returns false
7272
```
7373

74+
The function does not distinguish between `-0` and `+0`, treating them as equal.
75+
76+
```javascript
77+
var Complex128 = require( '@stdlib/complex/float64/ctor' );
78+
79+
var bool = isAlmostEqual( 0.0, -0.0, 0 );
80+
// returns true
81+
82+
var z1 = new Complex128( 0.0, 0.0 );
83+
var z2 = new Complex128( -0.0, -0.0 );
84+
85+
bool = isAlmostEqual( z1, z2, 0 );
86+
// returns true
87+
```
88+
7489
</section>
7590

7691
<!-- /.usage -->

0 commit comments

Comments
 (0)