On 1/31/2016 9:08 PM, Ger wrote:
> Ger wrote:
>
>> Mike Horvath wrote:
>>
>>> How do I calculate a random integer between n and p, inclusively?
>>>
>>>
>>> Thanks
>> #declare RSeed = seed(1);
>>
> #declare RandomNumber = int(n + rand(RSeed) * (p - n));
>
Shouldn't you use floor instead of int? What if n and p are both negative?
Mike
Post a reply to this message
|