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 min and max (min < x < max), then this function could give incorrect results, since there are instances where rand() returns RAND_MAX. Is the intent of this function, in mathematical terms, to return (min, max) or (min, max] ? This question applies to get_random_sqrtf() as well. Thanks. Chris.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

