{"action":"created","comment":{"url":"https://api.github.com/repos/libgdx/libgdx/pulls/comments/35022973","id":35022973,"diff_hunk":"@@ -182,6 +182,24 @@ static public int randomSign () {\n \t\treturn 1 | (random.nextInt() >> 31);\r\n \t}\r\n \r\n+\t/** Returns a random point inside the unit circle */\r\n+\tstatic public Vector2 randomUnitCirclePoint (Vector2 vector) {\r\n+\t\tfloat theta = random(0f, PI2);\r\n+\t\tfloat sqrt = (float) Math.sqrt(random());\r\n+\t\treturn vector.set(sqrt * cos(theta), sqrt * sin(theta));\r\n+\t}\r\n+\r\n+\t/** Returns a random point on the unit sphere's surface */\r\n+\tstatic public Vector3 randomUnitSpherePoint (Vector3 vector) {\r","path":"gdx/src/com/badlogic/gdx/math/MathUtils.java","position":12,"original_position":12,"commit_id":"53318d272ee1a6e7104bd519cbaf08685979c576","original_commit_id":"53318d272ee1a6e7104bd519cbaf08685979c576","user":{"login":"Gtoknu","id":1661000,"avatar_url":"https://avatars.githubusercontent.com/u/1661000?v=3","gravatar_id":"","url":"https://api.github.com/users/Gtoknu","html_url":"https://github.com/Gtoknu","followers_url":"https://api.github.com/users/Gtoknu/followers","following_url":"https://api.github.com/users/Gtoknu/following{/other_user}","gists_url":"https://api.github.com/users/Gtoknu/gists{/gist_id}","starred_url":"https://api.github.com/users/Gtoknu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gtoknu/subscriptions","organizations_url":"https://api.github.com/users/Gtoknu/orgs","repos_url":"https://api.github.com/users/Gtoknu/repos","events_url":"https://api.github.com/users/Gtoknu/events{/privacy}","received_events_url":"https://api.github.com/users/Gtoknu/received_events","type":"User","site_admin":false},"body":"The sphere bounds the ball. True, all points it picks are INSIDE the sphere, but they lay on the ball, not the sphere.","created_at":"2015-07-20T17:52:29Z","updated_at":"2015-07-20T17:52:29Z","html_url":"https://github.com/libgdx/libgdx/pull/3222#discussion_r35022973","pull_request_url":"https://api.github.com/repos/libgdx/libgdx/pulls/3222","_links":{"self":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/comments/35022973"},"html":{"href":"https://github.com/libgdx/libgdx/pull/3222#discussion_r35022973"},"pull_request":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/3222"}}},"pull_request":{"url":"https://api.github.com/repos/libgdx/libgdx/pulls/3222","id":38298905,"html_url":"https://github.com/libgdx/libgdx/pull/3222","diff_url":"https://github.com/libgdx/libgdx/pull/3222.diff","patch_url":"https://github.com/libgdx/libgdx/pull/3222.patch","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/3222","number":3222,"state":"open","locked":false,"title":"Adds methods to create random vector","user":{"login":"felipefcm","id":7122990,"avatar_url":"https://avatars.githubusercontent.com/u/7122990?v=3","gravatar_id":"","url":"https://api.github.com/users/felipefcm","html_url":"https://github.com/felipefcm","followers_url":"https://api.github.com/users/felipefcm/followers","following_url":"https://api.github.com/users/felipefcm/following{/other_user}","gists_url":"https://api.github.com/users/felipefcm/gists{/gist_id}","starred_url":"https://api.github.com/users/felipefcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipefcm/subscriptions","organizations_url":"https://api.github.com/users/felipefcm/orgs","repos_url":"https://api.github.com/users/felipefcm/repos","events_url":"https://api.github.com/users/felipefcm/events{/privacy}","received_events_url":"https://api.github.com/users/felipefcm/received_events","type":"User","site_admin":false},"body":"Also added a method to set the components of the Vector3 based on a spherical coordinate.","created_at":"2015-06-23T03:48:44Z","updated_at":"2015-07-20T17:52:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d04f11c72986de5de1618c7ccde86e1b598e56d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/libgdx/libgdx/pulls/3222/commits","review_comments_url":"https://api.github.com/repos/libgdx/libgdx/pulls/3222/comments","review_comment_url":"https://api.github.com/repos/libgdx/libgdx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/3222/comments","statuses_url":"https://api.github.com/repos/libgdx/libgdx/statuses/53318d272ee1a6e7104bd519cbaf08685979c576","head":{"label":"felipefcm:master","ref":"master","sha":"53318d272ee1a6e7104bd519cbaf08685979c576","user":{"login":"felipefcm","id":7122990,"avatar_url":"https://avatars.githubusercontent.com/u/7122990?v=3","gravatar_id":"","url":"https://api.github.com/users/felipefcm","html_url":"https://github.com/felipefcm","followers_url":"https://api.github.com/users/felipefcm/followers","following_url":"https://api.github.com/users/felipefcm/following{/other_user}","gists_url":"https://api.github.com/users/felipefcm/gists{/gist_id}","starred_url":"https://api.github.com/users/felipefcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipefcm/subscriptions","organizations_url":"https://api.github.com/users/felipefcm/orgs","repos_url":"https://api.github.com/users/felipefcm/repos","events_url":"https://api.github.com/users/felipefcm/events{/privacy}","received_events_url":"https://api.github.com/users/felipefcm/received_events","type":"User","site_admin":false},"repo":{"id":37786787,"name":"libgdx","full_name":"felipefcm/libgdx","owner":{"login":"felipefcm","id":7122990,"avatar_url":"https://avatars.githubusercontent.com/u/7122990?v=3","gravatar_id":"","url":"https://api.github.com/users/felipefcm","html_url":"https://github.com/felipefcm","followers_url":"https://api.github.com/users/felipefcm/followers","following_url":"https://api.github.com/users/felipefcm/following{/other_user}","gists_url":"https://api.github.com/users/felipefcm/gists{/gist_id}","starred_url":"https://api.github.com/users/felipefcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipefcm/subscriptions","organizations_url":"https://api.github.com/users/felipefcm/orgs","repos_url":"https://api.github.com/users/felipefcm/repos","events_url":"https://api.github.com/users/felipefcm/events{/privacy}","received_events_url":"https://api.github.com/users/felipefcm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/felipefcm/libgdx","description":"Desktop/Android/HTML5/iOS Java game development framework","fork":true,"url":"https://api.github.com/repos/felipefcm/libgdx","forks_url":"https://api.github.com/repos/felipefcm/libgdx/forks","keys_url":"https://api.github.com/repos/felipefcm/libgdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/felipefcm/libgdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/felipefcm/libgdx/teams","hooks_url":"https://api.github.com/repos/felipefcm/libgdx/hooks","issue_events_url":"https://api.github.com/repos/felipefcm/libgdx/issues/events{/number}","events_url":"https://api.github.com/repos/felipefcm/libgdx/events","assignees_url":"https://api.github.com/repos/felipefcm/libgdx/assignees{/user}","branches_url":"https://api.github.com/repos/felipefcm/libgdx/branches{/branch}","tags_url":"https://api.github.com/repos/felipefcm/libgdx/tags","blobs_url":"https://api.github.com/repos/felipefcm/libgdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/felipefcm/libgdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/felipefcm/libgdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/felipefcm/libgdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/felipefcm/libgdx/statuses/{sha}","languages_url":"https://api.github.com/repos/felipefcm/libgdx/languages","stargazers_url":"https://api.github.com/repos/felipefcm/libgdx/stargazers","contributors_url":"https://api.github.com/repos/felipefcm/libgdx/contributors","subscribers_url":"https://api.github.com/repos/felipefcm/libgdx/subscribers","subscription_url":"https://api.github.com/repos/felipefcm/libgdx/subscription","commits_url":"https://api.github.com/repos/felipefcm/libgdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/felipefcm/libgdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/felipefcm/libgdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/felipefcm/libgdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/felipefcm/libgdx/contents/{+path}","compare_url":"https://api.github.com/repos/felipefcm/libgdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/felipefcm/libgdx/merges","archive_url":"https://api.github.com/repos/felipefcm/libgdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/felipefcm/libgdx/downloads","issues_url":"https://api.github.com/repos/felipefcm/libgdx/issues{/number}","pulls_url":"https://api.github.com/repos/felipefcm/libgdx/pulls{/number}","milestones_url":"https://api.github.com/repos/felipefcm/libgdx/milestones{/number}","notifications_url":"https://api.github.com/repos/felipefcm/libgdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/felipefcm/libgdx/labels{/name}","releases_url":"https://api.github.com/repos/felipefcm/libgdx/releases{/id}","created_at":"2015-06-20T21:35:36Z","updated_at":"2015-06-20T21:35:52Z","pushed_at":"2015-06-25T10:34:03Z","git_url":"git://github.com/felipefcm/libgdx.git","ssh_url":"git@github.com:felipefcm/libgdx.git","clone_url":"https://github.com/felipefcm/libgdx.git","svn_url":"https://github.com/felipefcm/libgdx","homepage":"http://www.libgdx.com/","size":879236,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libgdx:master","ref":"master","sha":"419a1f76c314f702251548f0ae310aa467b70a50","user":{"login":"libgdx","id":509841,"avatar_url":"https://avatars.githubusercontent.com/u/509841?v=3","gravatar_id":"","url":"https://api.github.com/users/libgdx","html_url":"https://github.com/libgdx","followers_url":"https://api.github.com/users/libgdx/followers","following_url":"https://api.github.com/users/libgdx/following{/other_user}","gists_url":"https://api.github.com/users/libgdx/gists{/gist_id}","starred_url":"https://api.github.com/users/libgdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgdx/subscriptions","organizations_url":"https://api.github.com/users/libgdx/orgs","repos_url":"https://api.github.com/users/libgdx/repos","events_url":"https://api.github.com/users/libgdx/events{/privacy}","received_events_url":"https://api.github.com/users/libgdx/received_events","type":"Organization","site_admin":false},"repo":{"id":5373551,"name":"libgdx","full_name":"libgdx/libgdx","owner":{"login":"libgdx","id":509841,"avatar_url":"https://avatars.githubusercontent.com/u/509841?v=3","gravatar_id":"","url":"https://api.github.com/users/libgdx","html_url":"https://github.com/libgdx","followers_url":"https://api.github.com/users/libgdx/followers","following_url":"https://api.github.com/users/libgdx/following{/other_user}","gists_url":"https://api.github.com/users/libgdx/gists{/gist_id}","starred_url":"https://api.github.com/users/libgdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgdx/subscriptions","organizations_url":"https://api.github.com/users/libgdx/orgs","repos_url":"https://api.github.com/users/libgdx/repos","events_url":"https://api.github.com/users/libgdx/events{/privacy}","received_events_url":"https://api.github.com/users/libgdx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgdx/libgdx","description":"Desktop/Android/HTML5/iOS Java game development framework","fork":false,"url":"https://api.github.com/repos/libgdx/libgdx","forks_url":"https://api.github.com/repos/libgdx/libgdx/forks","keys_url":"https://api.github.com/repos/libgdx/libgdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgdx/libgdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgdx/libgdx/teams","hooks_url":"https://api.github.com/repos/libgdx/libgdx/hooks","issue_events_url":"https://api.github.com/repos/libgdx/libgdx/issues/events{/number}","events_url":"https://api.github.com/repos/libgdx/libgdx/events","assignees_url":"https://api.github.com/repos/libgdx/libgdx/assignees{/user}","branches_url":"https://api.github.com/repos/libgdx/libgdx/branches{/branch}","tags_url":"https://api.github.com/repos/libgdx/libgdx/tags","blobs_url":"https://api.github.com/repos/libgdx/libgdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgdx/libgdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgdx/libgdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgdx/libgdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgdx/libgdx/statuses/{sha}","languages_url":"https://api.github.com/repos/libgdx/libgdx/languages","stargazers_url":"https://api.github.com/repos/libgdx/libgdx/stargazers","contributors_url":"https://api.github.com/repos/libgdx/libgdx/contributors","subscribers_url":"https://api.github.com/repos/libgdx/libgdx/subscribers","subscription_url":"https://api.github.com/repos/libgdx/libgdx/subscription","commits_url":"https://api.github.com/repos/libgdx/libgdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgdx/libgdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgdx/libgdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgdx/libgdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgdx/libgdx/contents/{+path}","compare_url":"https://api.github.com/repos/libgdx/libgdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgdx/libgdx/merges","archive_url":"https://api.github.com/repos/libgdx/libgdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgdx/libgdx/downloads","issues_url":"https://api.github.com/repos/libgdx/libgdx/issues{/number}","pulls_url":"https://api.github.com/repos/libgdx/libgdx/pulls{/number}","milestones_url":"https://api.github.com/repos/libgdx/libgdx/milestones{/number}","notifications_url":"https://api.github.com/repos/libgdx/libgdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgdx/libgdx/labels{/name}","releases_url":"https://api.github.com/repos/libgdx/libgdx/releases{/id}","created_at":"2012-08-10T19:34:38Z","updated_at":"2015-07-20T14:01:06Z","pushed_at":"2015-07-20T16:13:55Z","git_url":"git://github.com/libgdx/libgdx.git","ssh_url":"git@github.com:libgdx/libgdx.git","clone_url":"https://github.com/libgdx/libgdx.git","svn_url":"https://github.com/libgdx/libgdx","homepage":"http://www.libgdx.com/","size":1005229,"stargazers_count":6694,"watchers_count":6694,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4016,"mirror_url":null,"open_issues_count":99,"forks":4016,"open_issues":99,"watchers":6694,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/3222"},"html":{"href":"https://github.com/libgdx/libgdx/pull/3222"},"issue":{"href":"https://api.github.com/repos/libgdx/libgdx/issues/3222"},"comments":{"href":"https://api.github.com/repos/libgdx/libgdx/issues/3222/comments"},"review_comments":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/3222/comments"},"review_comment":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libgdx/libgdx/pulls/3222/commits"},"statuses":{"href":"https://api.github.com/repos/libgdx/libgdx/statuses/53318d272ee1a6e7104bd519cbaf08685979c576"}}}}