Quote:Original post by PenanceQuote:Original post by Sneftel
Waitasec.Quote:Original post by PenanceYou'd love to use a map to do addition for you?
Say I want to simulate 2d6. That means there are 6^2 = 36 possibilities that map to 11 buckets (2-12). I'd love to be able to call rand() once and get 0-35 as a result, and then map that back to the 2-12 range while preserving the proper probability distribution.
Not sure what you mean. =(
output = input%6 + input/6 + 2 . It's just addition.