lemon/random.h
changeset 1208 c6aa2cc1af04
parent 1164 04f57dad1b07
parent 1178 61fdd06833a6
equal deleted inserted replaced
33:82881bf52c2b 35:15837ac0843d
   337           ::mask(max);
   337           ::mask(max);
   338         Word num;
   338         Word num;
   339         do {
   339         do {
   340           num = rnd() & mask;
   340           num = rnd() & mask;
   341         } while (num > max);
   341         } while (num > max);
   342         return num;
   342         return static_cast<Result>(num);
   343       }
   343       }
   344     };
   344     };
   345 
   345 
   346     template <typename Result, int exp>
   346     template <typename Result, int exp>
   347     struct ShiftMultiplier {
   347     struct ShiftMultiplier {