Home > @taiyuuki/utils > math_random_int
math_random_int() function
该函数返回指定范围内的随机整数。
Signature:
typescript
declare function math_random_int(from: number, to: number): number;declare function math_random_int(from: number, to: number): number;Parameters
| Parameter | Type | Description |
|---|---|---|
| from | number | 生成随机整数的范围的最小值。 |
| to | number | “to”参数是生成随机整数的范围的上限。 |
Returns:
number
函数 math_random_int 返回介于 from 和 to 参数(含)之间的随机整数。