{"action":"created","comment":{"url":"https://api.github.com/repos/nitlang/nit/pulls/comments/40125244","id":40125244,"diff_hunk":"@@ -333,6 +333,45 @@ redef class Float\n \t# assert -0.5.lerp(0.0, 128.0) == -64.0\n \t# ~~~\n \tfun lerp(a, b: Float): Float do return (1.0 - self) * a + self * b\n+\n+\t# Quadratic Bézier interpolation between `a` and `b` with an `handle` using `self` as weight\n+\t#\n+\t# ~~~\n+\t# assert  0.00.qerp(0.0, 32.0, 128.0) == 0.0\n+\t# assert  0.25.qerp(0.0, 32.0, 128.0) == 20.0\n+\t# assert  0.50.qerp(0.0, 32.0, 128.0) == 48.0\n+\t# assert  0.75.qerp(0.0, 32.0, 128.0) == 84.0\n+\t# assert  1.00.qerp(0.0, 32.0, 128.0) == 128.0\n+\t# ~~~\n+\tfun qerp(a, handle, b: Float): Float do\n+\t\tvar p = self\n+\t\tvar i = 1.0 - p\n+\t\tvar r =     i*i * a +\n+\t\t\t2.0*i*p * handle +\n+\t\t\t    p*p * b\n+\t\treturn r\n+\tend","path":"lib/core/math.nit","position":21,"original_position":21,"commit_id":"285a2d9bfbdcfcfb343c2fb880b492bfc7f4f109","original_commit_id":"285a2d9bfbdcfcfb343c2fb880b492bfc7f4f109","user":{"login":"xymus","id":208057,"avatar_url":"https://avatars.githubusercontent.com/u/208057?v=3","gravatar_id":"","url":"https://api.github.com/users/xymus","html_url":"https://github.com/xymus","followers_url":"https://api.github.com/users/xymus/followers","following_url":"https://api.github.com/users/xymus/following{/other_user}","gists_url":"https://api.github.com/users/xymus/gists{/gist_id}","starred_url":"https://api.github.com/users/xymus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xymus/subscriptions","organizations_url":"https://api.github.com/users/xymus/orgs","repos_url":"https://api.github.com/users/xymus/repos","events_url":"https://api.github.com/users/xymus/events{/privacy}","received_events_url":"https://api.github.com/users/xymus/received_events","type":"User","site_admin":false},"body":"Good idea moving it to math, and I love the code art!","created_at":"2015-09-22T18:33:24Z","updated_at":"2015-09-22T18:33:24Z","html_url":"https://github.com/nitlang/nit/pull/1730#discussion_r40125244","pull_request_url":"https://api.github.com/repos/nitlang/nit/pulls/1730","_links":{"self":{"href":"https://api.github.com/repos/nitlang/nit/pulls/comments/40125244"},"html":{"href":"https://github.com/nitlang/nit/pull/1730#discussion_r40125244"},"pull_request":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1730"}}},"pull_request":{"url":"https://api.github.com/repos/nitlang/nit/pulls/1730","id":45589427,"html_url":"https://github.com/nitlang/nit/pull/1730","diff_url":"https://github.com/nitlang/nit/pull/1730.diff","patch_url":"https://github.com/nitlang/nit/pull/1730.patch","issue_url":"https://api.github.com/repos/nitlang/nit/issues/1730","number":1730,"state":"open","locked":false,"title":"new game: memory","user":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"body":"The code is good enough and the game complete enough I think.","created_at":"2015-09-21T19:32:23Z","updated_at":"2015-09-22T18:33:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53eb92e84bac13fd27feeb15848af20f55157a25","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nitlang/nit/pulls/1730/commits","review_comments_url":"https://api.github.com/repos/nitlang/nit/pulls/1730/comments","review_comment_url":"https://api.github.com/repos/nitlang/nit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nitlang/nit/issues/1730/comments","statuses_url":"https://api.github.com/repos/nitlang/nit/statuses/285a2d9bfbdcfcfb343c2fb880b492bfc7f4f109","head":{"label":"privat:memory","ref":"memory","sha":"285a2d9bfbdcfcfb343c2fb880b492bfc7f4f109","user":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"repo":{"id":41187555,"name":"mynit","full_name":"privat/mynit","owner":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/privat/mynit","description":"Nit language","fork":true,"url":"https://api.github.com/repos/privat/mynit","forks_url":"https://api.github.com/repos/privat/mynit/forks","keys_url":"https://api.github.com/repos/privat/mynit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/privat/mynit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/privat/mynit/teams","hooks_url":"https://api.github.com/repos/privat/mynit/hooks","issue_events_url":"https://api.github.com/repos/privat/mynit/issues/events{/number}","events_url":"https://api.github.com/repos/privat/mynit/events","assignees_url":"https://api.github.com/repos/privat/mynit/assignees{/user}","branches_url":"https://api.github.com/repos/privat/mynit/branches{/branch}","tags_url":"https://api.github.com/repos/privat/mynit/tags","blobs_url":"https://api.github.com/repos/privat/mynit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/privat/mynit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/privat/mynit/git/refs{/sha}","trees_url":"https://api.github.com/repos/privat/mynit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/privat/mynit/statuses/{sha}","languages_url":"https://api.github.com/repos/privat/mynit/languages","stargazers_url":"https://api.github.com/repos/privat/mynit/stargazers","contributors_url":"https://api.github.com/repos/privat/mynit/contributors","subscribers_url":"https://api.github.com/repos/privat/mynit/subscribers","subscription_url":"https://api.github.com/repos/privat/mynit/subscription","commits_url":"https://api.github.com/repos/privat/mynit/commits{/sha}","git_commits_url":"https://api.github.com/repos/privat/mynit/git/commits{/sha}","comments_url":"https://api.github.com/repos/privat/mynit/comments{/number}","issue_comment_url":"https://api.github.com/repos/privat/mynit/issues/comments{/number}","contents_url":"https://api.github.com/repos/privat/mynit/contents/{+path}","compare_url":"https://api.github.com/repos/privat/mynit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/privat/mynit/merges","archive_url":"https://api.github.com/repos/privat/mynit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/privat/mynit/downloads","issues_url":"https://api.github.com/repos/privat/mynit/issues{/number}","pulls_url":"https://api.github.com/repos/privat/mynit/pulls{/number}","milestones_url":"https://api.github.com/repos/privat/mynit/milestones{/number}","notifications_url":"https://api.github.com/repos/privat/mynit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/privat/mynit/labels{/name}","releases_url":"https://api.github.com/repos/privat/mynit/releases{/id}","created_at":"2015-08-22T03:08:04Z","updated_at":"2015-08-22T03:09:37Z","pushed_at":"2015-09-22T16:42:38Z","git_url":"git://github.com/privat/mynit.git","ssh_url":"git@github.com:privat/mynit.git","clone_url":"https://github.com/privat/mynit.git","svn_url":"https://github.com/privat/mynit","homepage":"http://nitlanguage.org","size":71372,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"nitlang:master","ref":"master","sha":"c5c30207f7ed23b4fa567cf850dc3d6d5b1892ea","user":{"login":"nitlang","id":5420298,"avatar_url":"https://avatars.githubusercontent.com/u/5420298?v=3","gravatar_id":"","url":"https://api.github.com/users/nitlang","html_url":"https://github.com/nitlang","followers_url":"https://api.github.com/users/nitlang/followers","following_url":"https://api.github.com/users/nitlang/following{/other_user}","gists_url":"https://api.github.com/users/nitlang/gists{/gist_id}","starred_url":"https://api.github.com/users/nitlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitlang/subscriptions","organizations_url":"https://api.github.com/users/nitlang/orgs","repos_url":"https://api.github.com/users/nitlang/repos","events_url":"https://api.github.com/users/nitlang/events{/privacy}","received_events_url":"https://api.github.com/users/nitlang/received_events","type":"Organization","site_admin":false},"repo":{"id":328597,"name":"nit","full_name":"nitlang/nit","owner":{"login":"nitlang","id":5420298,"avatar_url":"https://avatars.githubusercontent.com/u/5420298?v=3","gravatar_id":"","url":"https://api.github.com/users/nitlang","html_url":"https://github.com/nitlang","followers_url":"https://api.github.com/users/nitlang/followers","following_url":"https://api.github.com/users/nitlang/following{/other_user}","gists_url":"https://api.github.com/users/nitlang/gists{/gist_id}","starred_url":"https://api.github.com/users/nitlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitlang/subscriptions","organizations_url":"https://api.github.com/users/nitlang/orgs","repos_url":"https://api.github.com/users/nitlang/repos","events_url":"https://api.github.com/users/nitlang/events{/privacy}","received_events_url":"https://api.github.com/users/nitlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nitlang/nit","description":"Nit language","fork":false,"url":"https://api.github.com/repos/nitlang/nit","forks_url":"https://api.github.com/repos/nitlang/nit/forks","keys_url":"https://api.github.com/repos/nitlang/nit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nitlang/nit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nitlang/nit/teams","hooks_url":"https://api.github.com/repos/nitlang/nit/hooks","issue_events_url":"https://api.github.com/repos/nitlang/nit/issues/events{/number}","events_url":"https://api.github.com/repos/nitlang/nit/events","assignees_url":"https://api.github.com/repos/nitlang/nit/assignees{/user}","branches_url":"https://api.github.com/repos/nitlang/nit/branches{/branch}","tags_url":"https://api.github.com/repos/nitlang/nit/tags","blobs_url":"https://api.github.com/repos/nitlang/nit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nitlang/nit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nitlang/nit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nitlang/nit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nitlang/nit/statuses/{sha}","languages_url":"https://api.github.com/repos/nitlang/nit/languages","stargazers_url":"https://api.github.com/repos/nitlang/nit/stargazers","contributors_url":"https://api.github.com/repos/nitlang/nit/contributors","subscribers_url":"https://api.github.com/repos/nitlang/nit/subscribers","subscription_url":"https://api.github.com/repos/nitlang/nit/subscription","commits_url":"https://api.github.com/repos/nitlang/nit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nitlang/nit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nitlang/nit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nitlang/nit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nitlang/nit/contents/{+path}","compare_url":"https://api.github.com/repos/nitlang/nit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nitlang/nit/merges","archive_url":"https://api.github.com/repos/nitlang/nit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nitlang/nit/downloads","issues_url":"https://api.github.com/repos/nitlang/nit/issues{/number}","pulls_url":"https://api.github.com/repos/nitlang/nit/pulls{/number}","milestones_url":"https://api.github.com/repos/nitlang/nit/milestones{/number}","notifications_url":"https://api.github.com/repos/nitlang/nit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nitlang/nit/labels{/name}","releases_url":"https://api.github.com/repos/nitlang/nit/releases{/id}","created_at":"2009-10-06T15:03:00Z","updated_at":"2015-09-10T13:33:12Z","pushed_at":"2015-09-22T17:33:02Z","git_url":"git://github.com/nitlang/nit.git","ssh_url":"git@github.com:nitlang/nit.git","clone_url":"https://github.com/nitlang/nit.git","svn_url":"https://github.com/nitlang/nit","homepage":"http://nitlanguage.org","size":99645,"stargazers_count":78,"watchers_count":78,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":120,"forks":44,"open_issues":120,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1730"},"html":{"href":"https://github.com/nitlang/nit/pull/1730"},"issue":{"href":"https://api.github.com/repos/nitlang/nit/issues/1730"},"comments":{"href":"https://api.github.com/repos/nitlang/nit/issues/1730/comments"},"review_comments":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1730/comments"},"review_comment":{"href":"https://api.github.com/repos/nitlang/nit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1730/commits"},"statuses":{"href":"https://api.github.com/repos/nitlang/nit/statuses/285a2d9bfbdcfcfb343c2fb880b492bfc7f4f109"}}}}