rand: add rand* functions of which number is from random(3)