1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-08-01 09:49:36 +00:00
parent 92c35c26aa
commit 8987ad494a

View file

@ -71,17 +71,17 @@ int64 Random::nextInt64() throw()
bool Random::nextBool() throw()
{
return (nextInt() & 1) != 0;
return (nextInt() & 0x80000000) != 0;
}
float Random::nextFloat() throw()
{
return (nextInt() & 0x7fffffff) / (float) 0x7fffffff;
return ((uint32) nextInt()) / (float) 0xffffffff;
}
double Random::nextDouble() throw()
{
return (nextInt() & 0x7fffffff) / (double) 0x7fffffff;
return ((uint32) nextInt()) / (double) 0xffffffff;
}
//==============================================================================