A generic method that can return a random integer between 2 parameters like ruby does with rand(0..n).
rand(0..n)
Any suggestion?
Generate a random integer between from(inclusive) and to(exclusive)
from
to
import java.util.Random val random = Random() fun rand(from: Int, to: Int) : Int { return random.nextInt(to - from) + from }