namespace Utils { export function randomInteger ( min , max , inclusive ? ) { let w = Math . floor ( max - min ) ; if ( inclusive ) ++ w ; if ( w < 1 ) throw new Error ( "Random range may not be negative" ) ; return Math . floor ( ( Math . random ( ) * w ) + min ) ; } export function randomBoolean ( p ? ) { if ( null == p ) p = 0.5 ; return ( Math . random ( ) < p ) ; } }