A javascript class which provides random numbers with different distributions