/**
 * Generate Random int.
 * @function lib.random.randomInt
 * @param {number} min=0 - Min number to generate.
 * @param {number} max=100 - Max number to generate.
 * @returns {number} - Random number.
 * @author Taka Okunishi
 *
 */
module.exports = function (min, max) {
    switch (arguments.length) {
        case 0:
            min = 0;
            max = 100;
            break;
        case 1:
            max = arguments[0];
            min = 0;
            break;
    }
    return parseInt(Math.random() * (max - min)) + min;
};