param min param max returns Number . random = function ( min , max ) : number { return min + Math . round ( Math . random ( ) * ( max - min ) ) ; } ; param precision Number . prototype . round = function ( precision = 2 ) : number { return Math . round ( Number ( `${ + this . valueOf ( ) }e${ precision }` ) ) / Math . pow ( 10 , precision ) ; } ;