{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/6753","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/6753/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/6753/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/6753/events","html_url":"https://github.com/godotengine/godot/pull/6753","id":181868439,"number":6753,"title":"Prevents rand_from_seed from exceeding RANDOM_MAX","user":{"login":"iajrz","id":4443604,"avatar_url":"https://avatars.githubusercontent.com/u/4443604?v=3","gravatar_id":"","url":"https://api.github.com/users/iajrz","html_url":"https://github.com/iajrz","followers_url":"https://api.github.com/users/iajrz/followers","following_url":"https://api.github.com/users/iajrz/following{/other_user}","gists_url":"https://api.github.com/users/iajrz/gists{/gist_id}","starred_url":"https://api.github.com/users/iajrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iajrz/subscriptions","organizations_url":"https://api.github.com/users/iajrz/orgs","repos_url":"https://api.github.com/users/iajrz/repos","events_url":"https://api.github.com/users/iajrz/events{/privacy}","received_events_url":"https://api.github.com/users/iajrz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/4","html_url":"https://github.com/godotengine/godot/milestones/3.0","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/4/labels","id":1449702,"number":4,"title":"3.0","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars.githubusercontent.com/u/4701338?v=3","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":173,"closed_issues":36,"state":"open","created_at":"2015-12-08T11:42:08Z","updated_at":"2016-10-10T18:06:46Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-10-09T06:06:04Z","updated_at":"2016-10-10T20:32:35Z","closed_at":"2016-10-09T14:43:01Z","pull_request":{"url":"https://api.github.com/repos/godotengine/godot/pulls/6753","html_url":"https://github.com/godotengine/godot/pull/6753","diff_url":"https://github.com/godotengine/godot/pull/6753.diff","patch_url":"https://github.com/godotengine/godot/pull/6753.patch"},"body":"Even though the seed being returned had the most significant bit killed by & masking with Math::RANDOM_MAX, the value was already set in memory. Thus, calls that don't use the return value of the function (which is completely sane behavior, given that the function sets the pointer) can get a number larger than RANDOM_MAX."},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/252738080","html_url":"https://github.com/godotengine/godot/pull/6753#issuecomment-252738080","issue_url":"https://api.github.com/repos/godotengine/godot/issues/6753","id":252738080,"user":{"login":"iajrz","id":4443604,"avatar_url":"https://avatars.githubusercontent.com/u/4443604?v=3","gravatar_id":"","url":"https://api.github.com/users/iajrz","html_url":"https://github.com/iajrz","followers_url":"https://api.github.com/users/iajrz/followers","following_url":"https://api.github.com/users/iajrz/following{/other_user}","gists_url":"https://api.github.com/users/iajrz/gists{/gist_id}","starred_url":"https://api.github.com/users/iajrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iajrz/subscriptions","organizations_url":"https://api.github.com/users/iajrz/orgs","repos_url":"https://api.github.com/users/iajrz/repos","events_url":"https://api.github.com/users/iajrz/events{/privacy}","received_events_url":"https://api.github.com/users/iajrz/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T20:32:35Z","updated_at":"2016-10-10T20:32:35Z","body":"I found out where the algorithm is from. [Here](https://www.christianpinder.com/articles/pseudo-random-number-generation/) is a possible origin, and reference to possible original implementation.\r\n\r\nIn any case, even the fast implementation is slower than xorshift32: xorshift32 does 3 xors and 3 shifts, and the current algorithm (2 subtractions, an integer division, 2 multiplications, and a branch).\r\nI'd go with xorshift32 on those grounds alone."}}
{"actor":{"display_login":"iajrz"}}