Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Jun 20, 2022
1 parent a8b71a4 commit c040d2b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/number-precision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ yarn add @pansy/number-precision

## 🔨 使用

```
```ts
import NumberPrecision from '@pansy/number-precision';

const np = NumberPrecision();
const np = new NumberPrecision();

// 加法
np.plus(0.1, 0.2); // 0.3

// 乘法
np.times(0.1, 10); // 1

// 减法
np.minus(0.2, 0.1); // 0.1

np.add(0.1 + 0.2); // 0.3
// 除法
np.divide(0.2, 0.1); // 2
```

0 comments on commit c040d2b

Please sign in to comment.