POV-Ray : Newsgroups : povray.general : Random integer Server Time
1 Jun 2024 09:27:02 EDT (-0400)
  Random integer (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: tth
Subject: Re: Random integer
Date: 10 Feb 2016 01:39:16
Message: <56badb14$1@news.povray.org>
On 02/05/2016 08:56 AM, clipka a dit:
> Am 05.02.2016 um 03:49 schrieb Mike Horvath:
>> So should I use int or floor? The result is different for numbers below
>> zero.
>
> In your case you want floor(); otherwise, if your interval includes 0,
> too many random numbers will be mapped to 0, and not enough random
> numbers will be mapped to 0.

*BREAKING NEWS*

Annoucing POVray 3.9, _Now_ with quantum computation !

-- 
*wip* http://la.buvette.org/vrac/essai.avi *wip*


Post a reply to this message

From: clipka
Subject: Re: Random integer
Date: 10 Feb 2016 02:34:59
Message: <56bae823$1@news.povray.org>
Am 10.02.2016 um 07:39 schrieb tth:
> On 02/05/2016 08:56 AM, clipka a dit:
>> Am 05.02.2016 um 03:49 schrieb Mike Horvath:
>>> So should I use int or floor? The result is different for numbers below
>>> zero.
>>
>> In your case you want floor(); otherwise, if your interval includes 0,
>> too many random numbers will be mapped to 0, and not enough random
>> numbers will be mapped to 0.
> 
> *BREAKING NEWS*
> 
> Annoucing POVray 3.9, _Now_ with quantum computation !

Whoops. That should read, "... and not enough random numbers will be
mapped to n."

Sorry, no support for quantum computers in the near future ;)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.