Appearance
Function: priceAdd
▸ priceAdd(...args
): number
数字类型相加
Parameters
Name | Type | Description |
---|---|---|
...args | TParams [] | add(args1,args2,args3,.....) args代表是剩余参数 argsX:number|string |
Returns
number
返回number类型的相加值
示例:
ts
import { priceAdd } from 'wm-kit'
// 错误用法
2.51 + 0.01 // => 2.5199999999999996
// 正确用法
priceAdd(2.51, 0.01) // => 2.52
Author
曹海
Defined in
src/modules/price/index.ts:32