Added template support to randomInteger and randomFloat