Review Request: Convenience KRandom methods

Sebastian Trueg trueg at
Thu Aug 12 14:40:52 BST 2010

This is an automatically generated e-mail. To reply, visit:

(Updated 2010-08-12 13:40:52.150336)

Review request for kdelibs.


New implementation for the int range method using % instead of /. Better?


The KRandom namespace is quite useful. However, applications need to be full of code snippets that calculate a random number in a range. IMHO it makes perfect sense to do this once in the library. Thus, I am proposing this patch to introduce two methods providing random numbers from a range.
Feel free to improve the implementation. :)

Diffs (updated)

  trunk/KDE/kdelibs/kdecore/util/krandom.h 1162164 
  trunk/KDE/kdelibs/kdecore/util/krandom.cpp 1162164 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list