Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 11 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | export class Random { |
||
2 | uniform(max, min) { |
||
3 | return Math.random() * (max - min) + min; |
||
4 | } |
||
5 | |||
6 | int(max, min) { |
||
7 | return Math.floor(this.uniform(max, min)); |
||
8 | } |
||
9 | } |
||
10 | |||
11 | export const random = new Random(); |
||
12 |