Adding function GetRndVal(min,max) which returns a random var in an interval[].