All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.greatbit.utils.math.Random Maven / Gradle / Ivy

package ru.greatbit.utils.math;

/**
 * Created by azee on 23.06.15.
 */
public class Random {
    /**
     * Returns random within a range (inclusive)
     * @param min - Lower range valie (inclusive)
     * @param max - Upper range valie (inclusive)
     * @return - next random value
     */
    public static int next(int min, int max){
        return new java.util.Random().nextInt((max - min) + 1) + min;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy