{"action":"opened","number":140,"pull_request":{"url":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140","id":54891091,"html_url":"https://github.com/d-gamedev-team/gfm/pull/140","diff_url":"https://github.com/d-gamedev-team/gfm/pull/140.diff","patch_url":"https://github.com/d-gamedev-team/gfm/pull/140.patch","issue_url":"https://api.github.com/repos/d-gamedev-team/gfm/issues/140","number":140,"state":"open","locked":false,"title":"Add template constraint to math.lerp.","user":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars.githubusercontent.com/u/2496231?v=3","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"body":"This prevents math.lerp from conflicting with an otherwise unrelated\r\nuser-defined lerp.\r\n\r\nFor example, suppose a user wants to define lerp for colors:\r\n\r\n```\r\nstruct Color { float r, g, b; }\r\n\r\nauto lerp(T)(Color c1, Color c2, T f) {\r\n  Color c;\r\n  c.r = math.lerp(c1.r, c2.r, f);\r\n  c.g = math.lerp(c1.g, c2.g, f);\r\n  c.b = math.lerp(c1.b, c2.b, f);\r\n  return c;\r\n}\r\n```\r\n\r\nThis would have conflicted with gfm.math.lerp, which wouldn't work on\r\nColor as it doesn't support the necessary operations (e.g. opBinary!\"+\").\r\nWith the template constraint, both lerp functions can coexist.","created_at":"2016-01-01T13:01:50Z","updated_at":"2016-01-01T13:01:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140/commits","review_comments_url":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140/comments","review_comment_url":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/d-gamedev-team/gfm/issues/140/comments","statuses_url":"https://api.github.com/repos/d-gamedev-team/gfm/statuses/dfebd60670639a5d82f674036efb5e1f12ab6289","head":{"label":"rcorre:lerp_constraint","ref":"lerp_constraint","sha":"dfebd60670639a5d82f674036efb5e1f12ab6289","user":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars.githubusercontent.com/u/2496231?v=3","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"repo":{"id":48877748,"name":"gfm","full_name":"rcorre/gfm","owner":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars.githubusercontent.com/u/2496231?v=3","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcorre/gfm","description":"D gamedev toolkit. 3D maths, language-friendly wrappers, stb_truetype port, etc...","fork":true,"url":"https://api.github.com/repos/rcorre/gfm","forks_url":"https://api.github.com/repos/rcorre/gfm/forks","keys_url":"https://api.github.com/repos/rcorre/gfm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcorre/gfm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcorre/gfm/teams","hooks_url":"https://api.github.com/repos/rcorre/gfm/hooks","issue_events_url":"https://api.github.com/repos/rcorre/gfm/issues/events{/number}","events_url":"https://api.github.com/repos/rcorre/gfm/events","assignees_url":"https://api.github.com/repos/rcorre/gfm/assignees{/user}","branches_url":"https://api.github.com/repos/rcorre/gfm/branches{/branch}","tags_url":"https://api.github.com/repos/rcorre/gfm/tags","blobs_url":"https://api.github.com/repos/rcorre/gfm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcorre/gfm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcorre/gfm/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcorre/gfm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcorre/gfm/statuses/{sha}","languages_url":"https://api.github.com/repos/rcorre/gfm/languages","stargazers_url":"https://api.github.com/repos/rcorre/gfm/stargazers","contributors_url":"https://api.github.com/repos/rcorre/gfm/contributors","subscribers_url":"https://api.github.com/repos/rcorre/gfm/subscribers","subscription_url":"https://api.github.com/repos/rcorre/gfm/subscription","commits_url":"https://api.github.com/repos/rcorre/gfm/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcorre/gfm/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcorre/gfm/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcorre/gfm/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcorre/gfm/contents/{+path}","compare_url":"https://api.github.com/repos/rcorre/gfm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcorre/gfm/merges","archive_url":"https://api.github.com/repos/rcorre/gfm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcorre/gfm/downloads","issues_url":"https://api.github.com/repos/rcorre/gfm/issues{/number}","pulls_url":"https://api.github.com/repos/rcorre/gfm/pulls{/number}","milestones_url":"https://api.github.com/repos/rcorre/gfm/milestones{/number}","notifications_url":"https://api.github.com/repos/rcorre/gfm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcorre/gfm/labels{/name}","releases_url":"https://api.github.com/repos/rcorre/gfm/releases{/id}","created_at":"2016-01-01T12:39:49Z","updated_at":"2016-01-01T12:39:49Z","pushed_at":"2016-01-01T13:00:49Z","git_url":"git://github.com/rcorre/gfm.git","ssh_url":"git@github.com:rcorre/gfm.git","clone_url":"https://github.com/rcorre/gfm.git","svn_url":"https://github.com/rcorre/gfm","homepage":"http://d-gamedev-team.github.io/gfm/","size":2925,"stargazers_count":0,"watchers_count":0,"language":"D","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":"master"}},"base":{"label":"d-gamedev-team:master","ref":"master","sha":"83767ad870c91ff1fca34814a2bf443957e543eb","user":{"login":"d-gamedev-team","id":7584266,"avatar_url":"https://avatars.githubusercontent.com/u/7584266?v=3","gravatar_id":"","url":"https://api.github.com/users/d-gamedev-team","html_url":"https://github.com/d-gamedev-team","followers_url":"https://api.github.com/users/d-gamedev-team/followers","following_url":"https://api.github.com/users/d-gamedev-team/following{/other_user}","gists_url":"https://api.github.com/users/d-gamedev-team/gists{/gist_id}","starred_url":"https://api.github.com/users/d-gamedev-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-gamedev-team/subscriptions","organizations_url":"https://api.github.com/users/d-gamedev-team/orgs","repos_url":"https://api.github.com/users/d-gamedev-team/repos","events_url":"https://api.github.com/users/d-gamedev-team/events{/privacy}","received_events_url":"https://api.github.com/users/d-gamedev-team/received_events","type":"Organization","site_admin":false},"repo":{"id":3860001,"name":"gfm","full_name":"d-gamedev-team/gfm","owner":{"login":"d-gamedev-team","id":7584266,"avatar_url":"https://avatars.githubusercontent.com/u/7584266?v=3","gravatar_id":"","url":"https://api.github.com/users/d-gamedev-team","html_url":"https://github.com/d-gamedev-team","followers_url":"https://api.github.com/users/d-gamedev-team/followers","following_url":"https://api.github.com/users/d-gamedev-team/following{/other_user}","gists_url":"https://api.github.com/users/d-gamedev-team/gists{/gist_id}","starred_url":"https://api.github.com/users/d-gamedev-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-gamedev-team/subscriptions","organizations_url":"https://api.github.com/users/d-gamedev-team/orgs","repos_url":"https://api.github.com/users/d-gamedev-team/repos","events_url":"https://api.github.com/users/d-gamedev-team/events{/privacy}","received_events_url":"https://api.github.com/users/d-gamedev-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/d-gamedev-team/gfm","description":"D gamedev toolkit. 3D maths, language-friendly wrappers, stb_truetype port, etc...","fork":false,"url":"https://api.github.com/repos/d-gamedev-team/gfm","forks_url":"https://api.github.com/repos/d-gamedev-team/gfm/forks","keys_url":"https://api.github.com/repos/d-gamedev-team/gfm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/d-gamedev-team/gfm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/d-gamedev-team/gfm/teams","hooks_url":"https://api.github.com/repos/d-gamedev-team/gfm/hooks","issue_events_url":"https://api.github.com/repos/d-gamedev-team/gfm/issues/events{/number}","events_url":"https://api.github.com/repos/d-gamedev-team/gfm/events","assignees_url":"https://api.github.com/repos/d-gamedev-team/gfm/assignees{/user}","branches_url":"https://api.github.com/repos/d-gamedev-team/gfm/branches{/branch}","tags_url":"https://api.github.com/repos/d-gamedev-team/gfm/tags","blobs_url":"https://api.github.com/repos/d-gamedev-team/gfm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/d-gamedev-team/gfm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/d-gamedev-team/gfm/git/refs{/sha}","trees_url":"https://api.github.com/repos/d-gamedev-team/gfm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/d-gamedev-team/gfm/statuses/{sha}","languages_url":"https://api.github.com/repos/d-gamedev-team/gfm/languages","stargazers_url":"https://api.github.com/repos/d-gamedev-team/gfm/stargazers","contributors_url":"https://api.github.com/repos/d-gamedev-team/gfm/contributors","subscribers_url":"https://api.github.com/repos/d-gamedev-team/gfm/subscribers","subscription_url":"https://api.github.com/repos/d-gamedev-team/gfm/subscription","commits_url":"https://api.github.com/repos/d-gamedev-team/gfm/commits{/sha}","git_commits_url":"https://api.github.com/repos/d-gamedev-team/gfm/git/commits{/sha}","comments_url":"https://api.github.com/repos/d-gamedev-team/gfm/comments{/number}","issue_comment_url":"https://api.github.com/repos/d-gamedev-team/gfm/issues/comments{/number}","contents_url":"https://api.github.com/repos/d-gamedev-team/gfm/contents/{+path}","compare_url":"https://api.github.com/repos/d-gamedev-team/gfm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/d-gamedev-team/gfm/merges","archive_url":"https://api.github.com/repos/d-gamedev-team/gfm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/d-gamedev-team/gfm/downloads","issues_url":"https://api.github.com/repos/d-gamedev-team/gfm/issues{/number}","pulls_url":"https://api.github.com/repos/d-gamedev-team/gfm/pulls{/number}","milestones_url":"https://api.github.com/repos/d-gamedev-team/gfm/milestones{/number}","notifications_url":"https://api.github.com/repos/d-gamedev-team/gfm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/d-gamedev-team/gfm/labels{/name}","releases_url":"https://api.github.com/repos/d-gamedev-team/gfm/releases{/id}","created_at":"2012-03-28T21:47:41Z","updated_at":"2015-11-05T16:51:35Z","pushed_at":"2015-11-12T08:04:34Z","git_url":"git://github.com/d-gamedev-team/gfm.git","ssh_url":"git@github.com:d-gamedev-team/gfm.git","clone_url":"https://github.com/d-gamedev-team/gfm.git","svn_url":"https://github.com/d-gamedev-team/gfm","homepage":"http://d-gamedev-team.github.io/gfm/","size":4690,"stargazers_count":86,"watchers_count":86,"language":"D","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":3,"forks":29,"open_issues":3,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140"},"html":{"href":"https://github.com/d-gamedev-team/gfm/pull/140"},"issue":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/issues/140"},"comments":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/d-gamedev-team/gfm/statuses/dfebd60670639a5d82f674036efb5e1f12ab6289"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}