{"action":"created","issue":{"url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/1343","labels_url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/1343/labels{/name}","comments_url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/1343/comments","events_url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/1343/events","html_url":"https://github.com/IntelOrca/OpenRCT2/pull/1343","id":88252687,"number":1343,"title":"Some Cleanup of Past PRs","user":{"login":"LRFLEW","id":607715,"avatar_url":"https://avatars.githubusercontent.com/u/607715?v=3","gravatar_id":"","url":"https://api.github.com/users/LRFLEW","html_url":"https://github.com/LRFLEW","followers_url":"https://api.github.com/users/LRFLEW/followers","following_url":"https://api.github.com/users/LRFLEW/following{/other_user}","gists_url":"https://api.github.com/users/LRFLEW/gists{/gist_id}","starred_url":"https://api.github.com/users/LRFLEW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LRFLEW/subscriptions","organizations_url":"https://api.github.com/users/LRFLEW/orgs","repos_url":"https://api.github.com/users/LRFLEW/repos","events_url":"https://api.github.com/users/LRFLEW/events{/privacy}","received_events_url":"https://api.github.com/users/LRFLEW/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-14T21:39:20Z","updated_at":"2015-06-14T22:35:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/IntelOrca/OpenRCT2/pulls/1343","html_url":"https://github.com/IntelOrca/OpenRCT2/pull/1343","diff_url":"https://github.com/IntelOrca/OpenRCT2/pull/1343.diff","patch_url":"https://github.com/IntelOrca/OpenRCT2/pull/1343.patch"},"body":"After some feedback on the description of #1287 and some review of the code added in #1312, I decided to spend some time improving them."},"comment":{"url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/comments/111880584","html_url":"https://github.com/IntelOrca/OpenRCT2/pull/1343#issuecomment-111880584","issue_url":"https://api.github.com/repos/IntelOrca/OpenRCT2/issues/1343","id":111880584,"user":{"login":"LRFLEW","id":607715,"avatar_url":"https://avatars.githubusercontent.com/u/607715?v=3","gravatar_id":"","url":"https://api.github.com/users/LRFLEW","html_url":"https://github.com/LRFLEW","followers_url":"https://api.github.com/users/LRFLEW/followers","following_url":"https://api.github.com/users/LRFLEW/following{/other_user}","gists_url":"https://api.github.com/users/LRFLEW/gists{/gist_id}","starred_url":"https://api.github.com/users/LRFLEW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LRFLEW/subscriptions","organizations_url":"https://api.github.com/users/LRFLEW/orgs","repos_url":"https://api.github.com/users/LRFLEW/repos","events_url":"https://api.github.com/users/LRFLEW/events{/privacy}","received_events_url":"https://api.github.com/users/LRFLEW/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T22:35:48Z","updated_at":"2015-06-14T22:35:48Z","body":"It's a little hard to describe. In essence, it's using rejection sampling to produce a uniform distribution. The vast majority of the time it will only run once, but having the loop there improves the quality of the random number. The implementation I wrote is similar to the implementation of java.util.Random.nextInt(int); http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextInt(int)"}}