Completed implementation of GetRndVal(min,max).