Skip to content

Commit

Permalink
📚 docs(README): Improve code sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Oct 29, 2022
1 parent a7a415a commit 8a5cad4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ See [docs](https://arithmetic-type.github.io/double).
Parent is [js-library](https://github.com/make-github-pseudonymous-again/js-library).

```js
import {mul} from '@arithmetic-type/double';
mul(6, 7); // 42
import {add, mul, sub, div} from '@arithmetic-type/double';
add(0.1, 0.2); // 0.30000000000000004
mul(0.1, 0.2); // 0.020000000000000004
sub(0.1, 0.2); // -0.1
div(0.1, 0.2); // 0.5
```

[![License](https://img.shields.io/github/license/arithmetic-type/double.svg)](https://raw.githubusercontent.com/arithmetic-type/double/main/LICENSE)
Expand Down

0 comments on commit 8a5cad4

Please sign in to comment.