--- deliantra/server/include/util.h 2010/04/30 20:43:18 1.105 +++ deliantra/server/include/util.h 2010/05/02 11:23:51 1.106 @@ -483,7 +483,7 @@ template struct random_number_generator : generator { - // uniform distribution, 0 .. max (0, num - 1) + // uniform distribution, [0 .. num - 1] uint32_t operator ()(uint32_t num) { return !is_constant (num) ? get_range (num) // non-constant @@ -499,10 +499,10 @@ : get_range (r_min, r_max); } - // return a number within the closed interval [0..1] + // return a number within the half-open interval [0..1[ double operator ()() { - return this->next () / (double)0xFFFFFFFFU; + return this->next () / 0x100000000; } protected: