From 8987ad494aac2996eb121abc7ae9a31444823765 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 1 Aug 2007 09:49:36 +0000 Subject: [PATCH] --- src/juce_core/basics/juce_Random.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/juce_core/basics/juce_Random.cpp b/src/juce_core/basics/juce_Random.cpp index 044cf451a5..346e602b15 100644 --- a/src/juce_core/basics/juce_Random.cpp +++ b/src/juce_core/basics/juce_Random.cpp @@ -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; } //==============================================================================