[ODE] dRandInt Crash Fix

Jon Watte (ODE) hplus-ode at mindcontrol.org
Wed Jun 22 10:57:18 MST 2005


> You're right, dRandInt uses the formula from Numerical Recipes book. But I
> think it uses it correctly, I don't see the error and still don't see how
> integer greater than n-1 could have come out of it ...

If the floating point precision mode were set to 23 bits, such as it 
would be at times if using DirectX (or certain other libraries), then 
that could happen, even for doubles.

Cheers,

		/ h+


More information about the ODE mailing list