Merge pull request #2228 from alex/rand-int

Document how to get a random number as an integer, fixes #2190