Re: [osg-users] get_random

2008-01-31 Thread DC Fennell
d for indexing arrays randomly. (That's how I discovered this on a crash). Chris. - Original Message - From: "Scott" <[EMAIL PROTECTED]> To: "OpenSceneGraph Users" Sent: Thursday, January 31, 2008 10:14 AM Subject: Re: [osg-users] get_random > O

Re: [osg-users] get_random

2008-01-31 Thread DC Fennell
uot; <[EMAIL PROTECTED]> To: "OpenSceneGraph Users" Sent: Thursday, January 31, 2008 10:09 AM Subject: Re: [osg-users] get_random > El Thursday 31 January 2008 16:41:55 DC Fennell escribió: >> Hello everybody, >> >> I believe the get_random() function in ra

Re: [osg-users] get_random

2008-01-31 Thread Scott
On Jan 31, 2008 11:09 AM, Alberto Luaces <[EMAIL PROTECTED]> wrote: > I think it was more important for the original writer to get high quality > random numbers than to match the exact range. Maybe the documentation should > be changed in order to say that it returns min < x <= max, or the function

Re: [osg-users] get_random

2008-01-31 Thread Alberto Luaces
El Thursday 31 January 2008 16:41:55 DC Fennell escribió: > Hello everybody, > > I believe the get_random() function in range under osgParticle should be: > minimum + (maximum - minimum) * rand() / (RAND_MAX + 1); > It is written as: > > minimum + (maximum - minimum) * rand() / RAND_MAX; > > If you

[osg-users] get_random

2008-01-31 Thread DC Fennell
Hello everybody, I believe the get_random() function in range under osgParticle should be: minimum + (maximum - minimum) * rand() / (RAND_MAX + 1); It is written as: minimum + (maximum - minimum) * rand() / RAND_MAX; If you expect the values returned (as specified in the comments) to be between