mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-06-03 18:49:23 +08:00
RandomManager.getRandomFloat方法添加默认值
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user