{"action":"created","comment":{"url":"https://api.github.com/repos/servo/rust-geom/pulls/comments/31185464","id":31185464,"diff_hunk":"@@ -106,10 +127,80 @@ impl<T:Add<T, Output=T> + Copy + Clone + ApproxEq<T> + Mul<T, Output=T> + One +\n \n         return self.mul(&matrix);\n     }\n+\n+    pub fn create_translation(x: T, y: T, z: T) -> Matrix4<T> {\n+        let (_0, _1): (T, T) = (Zero::zero(), One::one());\n+        Matrix4(_1.clone(), _0.clone(), _0.clone(), _0.clone(),\n+                _0.clone(), _1.clone(), _0.clone(), _0.clone(),\n+                _0.clone(), _0.clone(), _1.clone(), _0.clone(),\n+                         x,          y,          z, _1.clone())\n+    }\n+\n+    pub fn create_scale(x: T, y: T, z: T) -> Matrix4<T> {\n+        let (_0, _1): (T, T) = (Zero::zero(), One::one());\n+        Matrix4(         x, _0.clone(), _0.clone(), _0.clone(),\n+                _0.clone(),          y, _0.clone(), _0.clone(),\n+                _0.clone(), _0.clone(),          z, _0.clone(),\n+                _0.clone(), _0.clone(), _0.clone(), _1.clone())\n+    }\n+\n+    pub fn create_rotation(x: T, y: T, z: T, theta: T) -> Matrix4<T> {","path":"src/matrix.rs","position":64,"original_position":64,"commit_id":"e1bedbe39291a21e03608c1dbebb42af7688ac88","original_commit_id":"e1bedbe39291a21e03608c1dbebb42af7688ac88","user":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"body":"Also I'd mention that this is an axis/angle rotation in a doc comment.","created_at":"2015-05-27T22:01:25Z","updated_at":"2015-05-27T22:01:25Z","html_url":"https://github.com/servo/rust-geom/pull/76#discussion_r31185464","pull_request_url":"https://api.github.com/repos/servo/rust-geom/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/comments/31185464"},"html":{"href":"https://github.com/servo/rust-geom/pull/76#discussion_r31185464"},"pull_request":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/servo/rust-geom/pulls/76","id":36262046,"html_url":"https://github.com/servo/rust-geom/pull/76","diff_url":"https://github.com/servo/rust-geom/pull/76.diff","patch_url":"https://github.com/servo/rust-geom/pull/76.patch","issue_url":"https://api.github.com/repos/servo/rust-geom/issues/76","number":76,"state":"open","locked":false,"title":"Add methods to create various matrix types.","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-27T01:39:19Z","updated_at":"2015-05-27T22:01:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e400c14194cc7c20b0cb39ff4732165874e407fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/servo/rust-geom/pulls/76/commits","review_comments_url":"https://api.github.com/repos/servo/rust-geom/pulls/76/comments","review_comment_url":"https://api.github.com/repos/servo/rust-geom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/rust-geom/issues/76/comments","statuses_url":"https://api.github.com/repos/servo/rust-geom/statuses/e1bedbe39291a21e03608c1dbebb42af7688ac88","head":{"label":"glennw:matrix-methods","ref":"matrix-methods","sha":"e1bedbe39291a21e03608c1dbebb42af7688ac88","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"repo":{"id":32437793,"name":"rust-geom","full_name":"glennw/rust-geom","owner":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glennw/rust-geom","description":"Geometry primitives (basic linear algebra) for Rust","fork":true,"url":"https://api.github.com/repos/glennw/rust-geom","forks_url":"https://api.github.com/repos/glennw/rust-geom/forks","keys_url":"https://api.github.com/repos/glennw/rust-geom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glennw/rust-geom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glennw/rust-geom/teams","hooks_url":"https://api.github.com/repos/glennw/rust-geom/hooks","issue_events_url":"https://api.github.com/repos/glennw/rust-geom/issues/events{/number}","events_url":"https://api.github.com/repos/glennw/rust-geom/events","assignees_url":"https://api.github.com/repos/glennw/rust-geom/assignees{/user}","branches_url":"https://api.github.com/repos/glennw/rust-geom/branches{/branch}","tags_url":"https://api.github.com/repos/glennw/rust-geom/tags","blobs_url":"https://api.github.com/repos/glennw/rust-geom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glennw/rust-geom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glennw/rust-geom/git/refs{/sha}","trees_url":"https://api.github.com/repos/glennw/rust-geom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glennw/rust-geom/statuses/{sha}","languages_url":"https://api.github.com/repos/glennw/rust-geom/languages","stargazers_url":"https://api.github.com/repos/glennw/rust-geom/stargazers","contributors_url":"https://api.github.com/repos/glennw/rust-geom/contributors","subscribers_url":"https://api.github.com/repos/glennw/rust-geom/subscribers","subscription_url":"https://api.github.com/repos/glennw/rust-geom/subscription","commits_url":"https://api.github.com/repos/glennw/rust-geom/commits{/sha}","git_commits_url":"https://api.github.com/repos/glennw/rust-geom/git/commits{/sha}","comments_url":"https://api.github.com/repos/glennw/rust-geom/comments{/number}","issue_comment_url":"https://api.github.com/repos/glennw/rust-geom/issues/comments{/number}","contents_url":"https://api.github.com/repos/glennw/rust-geom/contents/{+path}","compare_url":"https://api.github.com/repos/glennw/rust-geom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glennw/rust-geom/merges","archive_url":"https://api.github.com/repos/glennw/rust-geom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glennw/rust-geom/downloads","issues_url":"https://api.github.com/repos/glennw/rust-geom/issues{/number}","pulls_url":"https://api.github.com/repos/glennw/rust-geom/pulls{/number}","milestones_url":"https://api.github.com/repos/glennw/rust-geom/milestones{/number}","notifications_url":"https://api.github.com/repos/glennw/rust-geom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glennw/rust-geom/labels{/name}","releases_url":"https://api.github.com/repos/glennw/rust-geom/releases{/id}","created_at":"2015-03-18T04:28:37Z","updated_at":"2015-03-18T21:55:10Z","pushed_at":"2015-05-27T01:38:58Z","git_url":"git://github.com/glennw/rust-geom.git","ssh_url":"git@github.com:glennw/rust-geom.git","clone_url":"https://github.com/glennw/rust-geom.git","svn_url":"https://github.com/glennw/rust-geom","homepage":null,"size":246,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"servo:master","ref":"master","sha":"010c71b4ef7417b5c68bff239545ad6ad029027a","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":4592409,"name":"rust-geom","full_name":"servo/rust-geom","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/rust-geom","description":"Geometry primitives (basic linear algebra) for Rust","fork":false,"url":"https://api.github.com/repos/servo/rust-geom","forks_url":"https://api.github.com/repos/servo/rust-geom/forks","keys_url":"https://api.github.com/repos/servo/rust-geom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/rust-geom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/rust-geom/teams","hooks_url":"https://api.github.com/repos/servo/rust-geom/hooks","issue_events_url":"https://api.github.com/repos/servo/rust-geom/issues/events{/number}","events_url":"https://api.github.com/repos/servo/rust-geom/events","assignees_url":"https://api.github.com/repos/servo/rust-geom/assignees{/user}","branches_url":"https://api.github.com/repos/servo/rust-geom/branches{/branch}","tags_url":"https://api.github.com/repos/servo/rust-geom/tags","blobs_url":"https://api.github.com/repos/servo/rust-geom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/rust-geom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/rust-geom/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/rust-geom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/rust-geom/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/rust-geom/languages","stargazers_url":"https://api.github.com/repos/servo/rust-geom/stargazers","contributors_url":"https://api.github.com/repos/servo/rust-geom/contributors","subscribers_url":"https://api.github.com/repos/servo/rust-geom/subscribers","subscription_url":"https://api.github.com/repos/servo/rust-geom/subscription","commits_url":"https://api.github.com/repos/servo/rust-geom/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/rust-geom/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/rust-geom/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/rust-geom/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/rust-geom/contents/{+path}","compare_url":"https://api.github.com/repos/servo/rust-geom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/rust-geom/merges","archive_url":"https://api.github.com/repos/servo/rust-geom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/rust-geom/downloads","issues_url":"https://api.github.com/repos/servo/rust-geom/issues{/number}","pulls_url":"https://api.github.com/repos/servo/rust-geom/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/rust-geom/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/rust-geom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/rust-geom/labels{/name}","releases_url":"https://api.github.com/repos/servo/rust-geom/releases{/id}","created_at":"2012-06-08T01:23:25Z","updated_at":"2015-05-24T09:08:33Z","pushed_at":"2015-05-27T01:39:20Z","git_url":"git://github.com/servo/rust-geom.git","ssh_url":"git@github.com:servo/rust-geom.git","clone_url":"https://github.com/servo/rust-geom.git","svn_url":"https://github.com/servo/rust-geom","homepage":null,"size":931,"stargazers_count":41,"watchers_count":41,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":2,"forks":23,"open_issues":2,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/76"},"html":{"href":"https://github.com/servo/rust-geom/pull/76"},"issue":{"href":"https://api.github.com/repos/servo/rust-geom/issues/76"},"comments":{"href":"https://api.github.com/repos/servo/rust-geom/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/rust-geom/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/servo/rust-geom/statuses/e1bedbe39291a21e03608c1dbebb42af7688ac88"}}}}