{"action":"created","comment":{"url":"https://api.github.com/repos/Hextris/hextris/pulls/comments/28615308","id":28615308,"diff_hunk":"@@ -78,21 +78,16 @@ function Block(fallingLane, color, iter, distFromHex, settled) {\n \t\tif(attached === undefined)\n \t\t\tattached = false;\n \n-\t\tif(this.angle > this.targetAngle) {\n-\t\t\tthis.angularVelocity -= angularVelocityConst * MainHex.dt;\n-\t\t}\n-\t\telse if(this.angle < this.targetAngle) {\n-\t\t\tthis.angularVelocity += angularVelocityConst * MainHex.dt;\n-\t\t}\n-\n-\t\tif (Math.abs(this.angle - this.targetAngle + this.angularVelocity) <= Math.abs(this.angularVelocity)) { //do better soon\n-\t\t\tthis.angle = this.targetAngle;\n-\t\t\tthis.angularVelocity = 0;\n-\t\t}\n-\t\telse {\n+\t\tvar sign = Math.sign(this.angle - this.targetAngle);\n+\t\tif (sign) {\n+\t\t\tthis.angularVelocity -= sign * angularVelocityConst * MainHex.dt;\n \t\t\tthis.angle += this.angularVelocity;\n+\t\t\tif(sign !== Math.sign(this.angle + this.angularVelocity - this.targetAngle)) {","path":"js_v9/Block.js","position":20,"original_position":20,"commit_id":"63ffae600f2c25cb904eb3716d64c34e37abfd77","original_commit_id":"63ffae600f2c25cb904eb3716d64c34e37abfd77","user":{"login":"Izzette","id":7987724,"avatar_url":"https://avatars.githubusercontent.com/u/7987724?v=3","gravatar_id":"","url":"https://api.github.com/users/Izzette","html_url":"https://github.com/Izzette","followers_url":"https://api.github.com/users/Izzette/followers","following_url":"https://api.github.com/users/Izzette/following{/other_user}","gists_url":"https://api.github.com/users/Izzette/gists{/gist_id}","starred_url":"https://api.github.com/users/Izzette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izzette/subscriptions","organizations_url":"https://api.github.com/users/Izzette/orgs","repos_url":"https://api.github.com/users/Izzette/repos","events_url":"https://api.github.com/users/Izzette/events{/privacy}","received_events_url":"https://api.github.com/users/Izzette/received_events","type":"User","site_admin":false},"body":"Yeah, but it should never leave this block overshot?","created_at":"2015-04-17T17:52:31Z","updated_at":"2015-04-17T17:52:31Z","html_url":"https://github.com/Hextris/hextris/pull/130#discussion_r28615308","pull_request_url":"https://api.github.com/repos/Hextris/hextris/pulls/130","_links":{"self":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/comments/28615308"},"html":{"href":"https://github.com/Hextris/hextris/pull/130#discussion_r28615308"},"pull_request":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/Hextris/hextris/pulls/130","id":33393068,"html_url":"https://github.com/Hextris/hextris/pull/130","diff_url":"https://github.com/Hextris/hextris/pull/130.diff","patch_url":"https://github.com/Hextris/hextris/pull/130.patch","issue_url":"https://api.github.com/repos/Hextris/hextris/issues/130","number":130,"state":"open","locked":false,"title":"Refactoring: block.draw angle updating","user":{"login":"Izzette","id":7987724,"avatar_url":"https://avatars.githubusercontent.com/u/7987724?v=3","gravatar_id":"","url":"https://api.github.com/users/Izzette","html_url":"https://github.com/Izzette","followers_url":"https://api.github.com/users/Izzette/followers","following_url":"https://api.github.com/users/Izzette/following{/other_user}","gists_url":"https://api.github.com/users/Izzette/gists{/gist_id}","starred_url":"https://api.github.com/users/Izzette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izzette/subscriptions","organizations_url":"https://api.github.com/users/Izzette/orgs","repos_url":"https://api.github.com/users/Izzette/repos","events_url":"https://api.github.com/users/Izzette/events{/privacy}","received_events_url":"https://api.github.com/users/Izzette/received_events","type":"User","site_admin":false},"body":"* Removed unnecessary code\r\n* Decreased the (computational?) complexity","created_at":"2015-04-15T20:28:53Z","updated_at":"2015-04-17T17:52:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecd4603986f143068fcb4b2970f14eaab77e0248","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Hextris/hextris/pulls/130/commits","review_comments_url":"https://api.github.com/repos/Hextris/hextris/pulls/130/comments","review_comment_url":"https://api.github.com/repos/Hextris/hextris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Hextris/hextris/issues/130/comments","statuses_url":"https://api.github.com/repos/Hextris/hextris/statuses/63ffae600f2c25cb904eb3716d64c34e37abfd77","head":{"label":"Izzette:gh-pages","ref":"gh-pages","sha":"63ffae600f2c25cb904eb3716d64c34e37abfd77","user":{"login":"Izzette","id":7987724,"avatar_url":"https://avatars.githubusercontent.com/u/7987724?v=3","gravatar_id":"","url":"https://api.github.com/users/Izzette","html_url":"https://github.com/Izzette","followers_url":"https://api.github.com/users/Izzette/followers","following_url":"https://api.github.com/users/Izzette/following{/other_user}","gists_url":"https://api.github.com/users/Izzette/gists{/gist_id}","starred_url":"https://api.github.com/users/Izzette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izzette/subscriptions","organizations_url":"https://api.github.com/users/Izzette/orgs","repos_url":"https://api.github.com/users/Izzette/repos","events_url":"https://api.github.com/users/Izzette/events{/privacy}","received_events_url":"https://api.github.com/users/Izzette/received_events","type":"User","site_admin":false},"repo":{"id":34005367,"name":"hextris","full_name":"Izzette/hextris","owner":{"login":"Izzette","id":7987724,"avatar_url":"https://avatars.githubusercontent.com/u/7987724?v=3","gravatar_id":"","url":"https://api.github.com/users/Izzette","html_url":"https://github.com/Izzette","followers_url":"https://api.github.com/users/Izzette/followers","following_url":"https://api.github.com/users/Izzette/following{/other_user}","gists_url":"https://api.github.com/users/Izzette/gists{/gist_id}","starred_url":"https://api.github.com/users/Izzette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izzette/subscriptions","organizations_url":"https://api.github.com/users/Izzette/orgs","repos_url":"https://api.github.com/users/Izzette/repos","events_url":"https://api.github.com/users/Izzette/events{/privacy}","received_events_url":"https://api.github.com/users/Izzette/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Izzette/hextris","description":"A fast paced puzzle game inspired by Tetris","fork":true,"url":"https://api.github.com/repos/Izzette/hextris","forks_url":"https://api.github.com/repos/Izzette/hextris/forks","keys_url":"https://api.github.com/repos/Izzette/hextris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Izzette/hextris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Izzette/hextris/teams","hooks_url":"https://api.github.com/repos/Izzette/hextris/hooks","issue_events_url":"https://api.github.com/repos/Izzette/hextris/issues/events{/number}","events_url":"https://api.github.com/repos/Izzette/hextris/events","assignees_url":"https://api.github.com/repos/Izzette/hextris/assignees{/user}","branches_url":"https://api.github.com/repos/Izzette/hextris/branches{/branch}","tags_url":"https://api.github.com/repos/Izzette/hextris/tags","blobs_url":"https://api.github.com/repos/Izzette/hextris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Izzette/hextris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Izzette/hextris/git/refs{/sha}","trees_url":"https://api.github.com/repos/Izzette/hextris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Izzette/hextris/statuses/{sha}","languages_url":"https://api.github.com/repos/Izzette/hextris/languages","stargazers_url":"https://api.github.com/repos/Izzette/hextris/stargazers","contributors_url":"https://api.github.com/repos/Izzette/hextris/contributors","subscribers_url":"https://api.github.com/repos/Izzette/hextris/subscribers","subscription_url":"https://api.github.com/repos/Izzette/hextris/subscription","commits_url":"https://api.github.com/repos/Izzette/hextris/commits{/sha}","git_commits_url":"https://api.github.com/repos/Izzette/hextris/git/commits{/sha}","comments_url":"https://api.github.com/repos/Izzette/hextris/comments{/number}","issue_comment_url":"https://api.github.com/repos/Izzette/hextris/issues/comments{/number}","contents_url":"https://api.github.com/repos/Izzette/hextris/contents/{+path}","compare_url":"https://api.github.com/repos/Izzette/hextris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Izzette/hextris/merges","archive_url":"https://api.github.com/repos/Izzette/hextris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Izzette/hextris/downloads","issues_url":"https://api.github.com/repos/Izzette/hextris/issues{/number}","pulls_url":"https://api.github.com/repos/Izzette/hextris/pulls{/number}","milestones_url":"https://api.github.com/repos/Izzette/hextris/milestones{/number}","notifications_url":"https://api.github.com/repos/Izzette/hextris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Izzette/hextris/labels{/name}","releases_url":"https://api.github.com/repos/Izzette/hextris/releases{/id}","created_at":"2015-04-15T16:23:38Z","updated_at":"2015-04-17T17:34:15Z","pushed_at":"2015-04-17T17:34:15Z","git_url":"git://github.com/Izzette/hextris.git","ssh_url":"git@github.com:Izzette/hextris.git","clone_url":"https://github.com/Izzette/hextris.git","svn_url":"https://github.com/Izzette/hextris","homepage":"http://hextris.io/","size":28515,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"Hextris:gh-pages","ref":"gh-pages","sha":"2e6d717eb837eec146a07627c902daae673de25a","user":{"login":"Hextris","id":8196313,"avatar_url":"https://avatars.githubusercontent.com/u/8196313?v=3","gravatar_id":"","url":"https://api.github.com/users/Hextris","html_url":"https://github.com/Hextris","followers_url":"https://api.github.com/users/Hextris/followers","following_url":"https://api.github.com/users/Hextris/following{/other_user}","gists_url":"https://api.github.com/users/Hextris/gists{/gist_id}","starred_url":"https://api.github.com/users/Hextris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hextris/subscriptions","organizations_url":"https://api.github.com/users/Hextris/orgs","repos_url":"https://api.github.com/users/Hextris/repos","events_url":"https://api.github.com/users/Hextris/events{/privacy}","received_events_url":"https://api.github.com/users/Hextris/received_events","type":"Organization","site_admin":false},"repo":{"id":19886948,"name":"hextris","full_name":"Hextris/hextris","owner":{"login":"Hextris","id":8196313,"avatar_url":"https://avatars.githubusercontent.com/u/8196313?v=3","gravatar_id":"","url":"https://api.github.com/users/Hextris","html_url":"https://github.com/Hextris","followers_url":"https://api.github.com/users/Hextris/followers","following_url":"https://api.github.com/users/Hextris/following{/other_user}","gists_url":"https://api.github.com/users/Hextris/gists{/gist_id}","starred_url":"https://api.github.com/users/Hextris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hextris/subscriptions","organizations_url":"https://api.github.com/users/Hextris/orgs","repos_url":"https://api.github.com/users/Hextris/repos","events_url":"https://api.github.com/users/Hextris/events{/privacy}","received_events_url":"https://api.github.com/users/Hextris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Hextris/hextris","description":"A fast paced puzzle game inspired by Tetris","fork":false,"url":"https://api.github.com/repos/Hextris/hextris","forks_url":"https://api.github.com/repos/Hextris/hextris/forks","keys_url":"https://api.github.com/repos/Hextris/hextris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hextris/hextris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hextris/hextris/teams","hooks_url":"https://api.github.com/repos/Hextris/hextris/hooks","issue_events_url":"https://api.github.com/repos/Hextris/hextris/issues/events{/number}","events_url":"https://api.github.com/repos/Hextris/hextris/events","assignees_url":"https://api.github.com/repos/Hextris/hextris/assignees{/user}","branches_url":"https://api.github.com/repos/Hextris/hextris/branches{/branch}","tags_url":"https://api.github.com/repos/Hextris/hextris/tags","blobs_url":"https://api.github.com/repos/Hextris/hextris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hextris/hextris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hextris/hextris/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hextris/hextris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hextris/hextris/statuses/{sha}","languages_url":"https://api.github.com/repos/Hextris/hextris/languages","stargazers_url":"https://api.github.com/repos/Hextris/hextris/stargazers","contributors_url":"https://api.github.com/repos/Hextris/hextris/contributors","subscribers_url":"https://api.github.com/repos/Hextris/hextris/subscribers","subscription_url":"https://api.github.com/repos/Hextris/hextris/subscription","commits_url":"https://api.github.com/repos/Hextris/hextris/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hextris/hextris/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hextris/hextris/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hextris/hextris/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hextris/hextris/contents/{+path}","compare_url":"https://api.github.com/repos/Hextris/hextris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hextris/hextris/merges","archive_url":"https://api.github.com/repos/Hextris/hextris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hextris/hextris/downloads","issues_url":"https://api.github.com/repos/Hextris/hextris/issues{/number}","pulls_url":"https://api.github.com/repos/Hextris/hextris/pulls{/number}","milestones_url":"https://api.github.com/repos/Hextris/hextris/milestones{/number}","notifications_url":"https://api.github.com/repos/Hextris/hextris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hextris/hextris/labels{/name}","releases_url":"https://api.github.com/repos/Hextris/hextris/releases{/id}","created_at":"2014-05-17T13:17:26Z","updated_at":"2015-04-17T12:06:52Z","pushed_at":"2015-04-17T17:34:16Z","git_url":"git://github.com/Hextris/hextris.git","ssh_url":"git@github.com:Hextris/hextris.git","clone_url":"https://github.com/Hextris/hextris.git","svn_url":"https://github.com/Hextris/hextris","homepage":"http://hextris.io/","size":28515,"stargazers_count":677,"watchers_count":677,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":203,"mirror_url":null,"open_issues_count":14,"forks":203,"open_issues":14,"watchers":677,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/130"},"html":{"href":"https://github.com/Hextris/hextris/pull/130"},"issue":{"href":"https://api.github.com/repos/Hextris/hextris/issues/130"},"comments":{"href":"https://api.github.com/repos/Hextris/hextris/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Hextris/hextris/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/Hextris/hextris/statuses/63ffae600f2c25cb904eb3716d64c34e37abfd77"}}}}