We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8b71a4 commit c040d2bCopy full SHA for c040d2b
packages/number-precision/README.md
@@ -15,10 +15,20 @@ yarn add @pansy/number-precision
15
16
## 🔨 使用
17
18
-```
+```ts
19
import NumberPrecision from '@pansy/number-precision';
20
21
-const np = NumberPrecision();
+const np = new NumberPrecision();
22
+
23
+// 加法
24
+np.plus(0.1, 0.2); // 0.3
25
26
+// 乘法
27
+np.times(0.1, 10); // 1
28
29
+// 减法
30
+np.minus(0.2, 0.1); // 0.1
31
-np.add(0.1 + 0.2); // 0.3
32
+// 除法
33
+np.divide(0.2, 0.1); // 2
34
```
0 commit comments