Skip to content

getRatio

计算两个数字的比率

示例

ts
const a = 10
const b = 20

getRatio(a, b) // '1:2'

参数

参数说明类型默认值是否必填
num1第一个数number-
num2第二个数number-