RandomManager.getRandomFloat方法添加默认值

This commit is contained in:
dgflash
2023-03-30 17:17:55 +08:00
parent c44bf67c7a
commit 5427556077

View File

@@ -52,7 +52,7 @@ export class RandomManager {
* @param max 最大值
* @param type 类型
*/
getRandomFloat(min: number, max: number): number {
getRandomFloat(min: number = 0, max: number = 1): number {
return this.getRandom() * (max - min) + min;
}