ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.32 by root, Thu Jan 18 19:32:37 2007 UTC vs.
Revision 1.33 by root, Thu Jan 18 22:20:00 2007 UTC

207 } 207 }
208 208
209 // return a number within (min .. max) 209 // return a number within (min .. max)
210 int operator () (int r_min, int r_max) 210 int operator () (int r_min, int r_max)
211 { 211 {
212 return r_min + next () % max (r_max - r_min + 1, 1); 212 return r_min + (*this) (max (r_max - r_min + 1, 1));
213 } 213 }
214 214
215 double operator ()() 215 double operator ()()
216 { 216 {
217 return next () / (double)0xFFFFFFFFU; 217 return next () / (double)0xFFFFFFFFU;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines