Skip to content
On this page

wm-kit / Exports / priceMultiply

Function: priceMultiply

priceMultiply(...args): number

数字类型相乘

Parameters

NameTypeDescription
...argsTParams[]add(args1,args2,args3,.....) args代表是剩余参数 argsX:number|string

Returns

number

返回number类型的相乘值

示例:

ts
import { priceMultiply } from 'wm-kit'
// 错误用法
2.51 * 0.01 // => 0.025099999999999997
// 正确用法
priceMultiply(2.51, 0.01) // => 0.251

Author

曹海

Defined in

src/modules/price/index.ts:93

Released under the MIT License.