{"action":"created","comment":{"url":"https://api.github.com/repos/rtoal/polyglot/pulls/comments/55113184","id":55113184,"diff_hunk":"@@ -0,0 +1,38 @@\n+import Foundation\n+\n+struct Vector: CustomStringConvertible {\n+    \n+    var x: Double\n+    var y: Double\n+    \n+    init(x: Double, y: Double){\n+        self.x = x;\n+        self.y = y;\n+    }\n+    \n+    func magnititude() -> Double {\n+        return pow(x*x + y*y, 1/2)\n+    }\n+    \n+    var description: String {\n+        return \"<\\(x),\\(y)>\"\n+    }\n+}\n+\n+func + (left: Vector, right: Vector) -> Vector {\n+    return Vector(x: left.x + right.x, y: left.y + right.y)\n+}\n+\n+func * (left: Vector, right: Vector) -> Double {\n+    return left.x * right.x + left.y * right.y\n+}\n+\n+let u = Vector(x: 3,y: 4)\n+let v = Vector(x: -5,y: 10)","path":"swift/vectors.swift","position":31,"original_position":31,"commit_id":"245f84812d4f0b3466d339ae8838a4671bffc78e","original_commit_id":"245f84812d4f0b3466d339ae8838a4671bffc78e","user":{"login":"jadengore","id":1921464,"avatar_url":"https://avatars.githubusercontent.com/u/1921464?v=3","gravatar_id":"","url":"https://api.github.com/users/jadengore","html_url":"https://github.com/jadengore","followers_url":"https://api.github.com/users/jadengore/followers","following_url":"https://api.github.com/users/jadengore/following{/other_user}","gists_url":"https://api.github.com/users/jadengore/gists{/gist_id}","starred_url":"https://api.github.com/users/jadengore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jadengore/subscriptions","organizations_url":"https://api.github.com/users/jadengore/orgs","repos_url":"https://api.github.com/users/jadengore/repos","events_url":"https://api.github.com/users/jadengore/events{/privacy}","received_events_url":"https://api.github.com/users/jadengore/received_events","type":"User","site_admin":false},"body":"@mwflickner Perhaps some spaces for these parameters?","created_at":"2016-03-05T02:12:13Z","updated_at":"2016-03-05T02:12:13Z","html_url":"https://github.com/rtoal/polyglot/pull/42#discussion_r55113184","pull_request_url":"https://api.github.com/repos/rtoal/polyglot/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/comments/55113184"},"html":{"href":"https://github.com/rtoal/polyglot/pull/42#discussion_r55113184"},"pull_request":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/rtoal/polyglot/pulls/42","id":61796627,"html_url":"https://github.com/rtoal/polyglot/pull/42","diff_url":"https://github.com/rtoal/polyglot/pull/42.diff","patch_url":"https://github.com/rtoal/polyglot/pull/42.patch","issue_url":"https://api.github.com/repos/rtoal/polyglot/issues/42","number":42,"state":"open","locked":false,"title":"SwiftVectorClass","user":{"login":"mwflickner","id":8574527,"avatar_url":"https://avatars.githubusercontent.com/u/8574527?v=3","gravatar_id":"","url":"https://api.github.com/users/mwflickner","html_url":"https://github.com/mwflickner","followers_url":"https://api.github.com/users/mwflickner/followers","following_url":"https://api.github.com/users/mwflickner/following{/other_user}","gists_url":"https://api.github.com/users/mwflickner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwflickner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwflickner/subscriptions","organizations_url":"https://api.github.com/users/mwflickner/orgs","repos_url":"https://api.github.com/users/mwflickner/repos","events_url":"https://api.github.com/users/mwflickner/events{/privacy}","received_events_url":"https://api.github.com/users/mwflickner/received_events","type":"User","site_admin":false},"body":"added vector class that matches python, erlang, lua string format, uses doubles","created_at":"2016-03-05T02:04:46Z","updated_at":"2016-03-05T02:12:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6aa5742562407814b7e97e408072aef682b476ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rtoal/polyglot/pulls/42/commits","review_comments_url":"https://api.github.com/repos/rtoal/polyglot/pulls/42/comments","review_comment_url":"https://api.github.com/repos/rtoal/polyglot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rtoal/polyglot/issues/42/comments","statuses_url":"https://api.github.com/repos/rtoal/polyglot/statuses/245f84812d4f0b3466d339ae8838a4671bffc78e","head":{"label":"rtoal:Mf/Issue40/VectorSwiftClass","ref":"Mf/Issue40/VectorSwiftClass","sha":"245f84812d4f0b3466d339ae8838a4671bffc78e","user":{"login":"rtoal","id":538615,"avatar_url":"https://avatars.githubusercontent.com/u/538615?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoal","html_url":"https://github.com/rtoal","followers_url":"https://api.github.com/users/rtoal/followers","following_url":"https://api.github.com/users/rtoal/following{/other_user}","gists_url":"https://api.github.com/users/rtoal/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoal/subscriptions","organizations_url":"https://api.github.com/users/rtoal/orgs","repos_url":"https://api.github.com/users/rtoal/repos","events_url":"https://api.github.com/users/rtoal/events{/privacy}","received_events_url":"https://api.github.com/users/rtoal/received_events","type":"User","site_admin":false},"repo":{"id":27696937,"name":"polyglot","full_name":"rtoal/polyglot","owner":{"login":"rtoal","id":538615,"avatar_url":"https://avatars.githubusercontent.com/u/538615?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoal","html_url":"https://github.com/rtoal","followers_url":"https://api.github.com/users/rtoal/followers","following_url":"https://api.github.com/users/rtoal/following{/other_user}","gists_url":"https://api.github.com/users/rtoal/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoal/subscriptions","organizations_url":"https://api.github.com/users/rtoal/orgs","repos_url":"https://api.github.com/users/rtoal/repos","events_url":"https://api.github.com/users/rtoal/events{/privacy}","received_events_url":"https://api.github.com/users/rtoal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtoal/polyglot","description":"A collection of examples in many languages","fork":false,"url":"https://api.github.com/repos/rtoal/polyglot","forks_url":"https://api.github.com/repos/rtoal/polyglot/forks","keys_url":"https://api.github.com/repos/rtoal/polyglot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtoal/polyglot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtoal/polyglot/teams","hooks_url":"https://api.github.com/repos/rtoal/polyglot/hooks","issue_events_url":"https://api.github.com/repos/rtoal/polyglot/issues/events{/number}","events_url":"https://api.github.com/repos/rtoal/polyglot/events","assignees_url":"https://api.github.com/repos/rtoal/polyglot/assignees{/user}","branches_url":"https://api.github.com/repos/rtoal/polyglot/branches{/branch}","tags_url":"https://api.github.com/repos/rtoal/polyglot/tags","blobs_url":"https://api.github.com/repos/rtoal/polyglot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtoal/polyglot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtoal/polyglot/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtoal/polyglot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtoal/polyglot/statuses/{sha}","languages_url":"https://api.github.com/repos/rtoal/polyglot/languages","stargazers_url":"https://api.github.com/repos/rtoal/polyglot/stargazers","contributors_url":"https://api.github.com/repos/rtoal/polyglot/contributors","subscribers_url":"https://api.github.com/repos/rtoal/polyglot/subscribers","subscription_url":"https://api.github.com/repos/rtoal/polyglot/subscription","commits_url":"https://api.github.com/repos/rtoal/polyglot/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtoal/polyglot/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtoal/polyglot/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtoal/polyglot/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtoal/polyglot/contents/{+path}","compare_url":"https://api.github.com/repos/rtoal/polyglot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtoal/polyglot/merges","archive_url":"https://api.github.com/repos/rtoal/polyglot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtoal/polyglot/downloads","issues_url":"https://api.github.com/repos/rtoal/polyglot/issues{/number}","pulls_url":"https://api.github.com/repos/rtoal/polyglot/pulls{/number}","milestones_url":"https://api.github.com/repos/rtoal/polyglot/milestones{/number}","notifications_url":"https://api.github.com/repos/rtoal/polyglot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtoal/polyglot/labels{/name}","releases_url":"https://api.github.com/repos/rtoal/polyglot/releases{/id}","deployments_url":"https://api.github.com/repos/rtoal/polyglot/deployments","created_at":"2014-12-08T04:02:17Z","updated_at":"2016-01-11T03:55:27Z","pushed_at":"2016-03-05T02:04:46Z","git_url":"git://github.com/rtoal/polyglot.git","ssh_url":"git@github.com:rtoal/polyglot.git","clone_url":"https://github.com/rtoal/polyglot.git","svn_url":"https://github.com/rtoal/polyglot","homepage":null,"size":291,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":7,"default_branch":"master"}},"base":{"label":"rtoal:master","ref":"master","sha":"a9b520f07b85d3e991ce7fd4bfc17427aa622b5e","user":{"login":"rtoal","id":538615,"avatar_url":"https://avatars.githubusercontent.com/u/538615?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoal","html_url":"https://github.com/rtoal","followers_url":"https://api.github.com/users/rtoal/followers","following_url":"https://api.github.com/users/rtoal/following{/other_user}","gists_url":"https://api.github.com/users/rtoal/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoal/subscriptions","organizations_url":"https://api.github.com/users/rtoal/orgs","repos_url":"https://api.github.com/users/rtoal/repos","events_url":"https://api.github.com/users/rtoal/events{/privacy}","received_events_url":"https://api.github.com/users/rtoal/received_events","type":"User","site_admin":false},"repo":{"id":27696937,"name":"polyglot","full_name":"rtoal/polyglot","owner":{"login":"rtoal","id":538615,"avatar_url":"https://avatars.githubusercontent.com/u/538615?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoal","html_url":"https://github.com/rtoal","followers_url":"https://api.github.com/users/rtoal/followers","following_url":"https://api.github.com/users/rtoal/following{/other_user}","gists_url":"https://api.github.com/users/rtoal/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoal/subscriptions","organizations_url":"https://api.github.com/users/rtoal/orgs","repos_url":"https://api.github.com/users/rtoal/repos","events_url":"https://api.github.com/users/rtoal/events{/privacy}","received_events_url":"https://api.github.com/users/rtoal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtoal/polyglot","description":"A collection of examples in many languages","fork":false,"url":"https://api.github.com/repos/rtoal/polyglot","forks_url":"https://api.github.com/repos/rtoal/polyglot/forks","keys_url":"https://api.github.com/repos/rtoal/polyglot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtoal/polyglot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtoal/polyglot/teams","hooks_url":"https://api.github.com/repos/rtoal/polyglot/hooks","issue_events_url":"https://api.github.com/repos/rtoal/polyglot/issues/events{/number}","events_url":"https://api.github.com/repos/rtoal/polyglot/events","assignees_url":"https://api.github.com/repos/rtoal/polyglot/assignees{/user}","branches_url":"https://api.github.com/repos/rtoal/polyglot/branches{/branch}","tags_url":"https://api.github.com/repos/rtoal/polyglot/tags","blobs_url":"https://api.github.com/repos/rtoal/polyglot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtoal/polyglot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtoal/polyglot/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtoal/polyglot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtoal/polyglot/statuses/{sha}","languages_url":"https://api.github.com/repos/rtoal/polyglot/languages","stargazers_url":"https://api.github.com/repos/rtoal/polyglot/stargazers","contributors_url":"https://api.github.com/repos/rtoal/polyglot/contributors","subscribers_url":"https://api.github.com/repos/rtoal/polyglot/subscribers","subscription_url":"https://api.github.com/repos/rtoal/polyglot/subscription","commits_url":"https://api.github.com/repos/rtoal/polyglot/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtoal/polyglot/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtoal/polyglot/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtoal/polyglot/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtoal/polyglot/contents/{+path}","compare_url":"https://api.github.com/repos/rtoal/polyglot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtoal/polyglot/merges","archive_url":"https://api.github.com/repos/rtoal/polyglot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtoal/polyglot/downloads","issues_url":"https://api.github.com/repos/rtoal/polyglot/issues{/number}","pulls_url":"https://api.github.com/repos/rtoal/polyglot/pulls{/number}","milestones_url":"https://api.github.com/repos/rtoal/polyglot/milestones{/number}","notifications_url":"https://api.github.com/repos/rtoal/polyglot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtoal/polyglot/labels{/name}","releases_url":"https://api.github.com/repos/rtoal/polyglot/releases{/id}","deployments_url":"https://api.github.com/repos/rtoal/polyglot/deployments","created_at":"2014-12-08T04:02:17Z","updated_at":"2016-01-11T03:55:27Z","pushed_at":"2016-03-05T02:04:46Z","git_url":"git://github.com/rtoal/polyglot.git","ssh_url":"git@github.com:rtoal/polyglot.git","clone_url":"https://github.com/rtoal/polyglot.git","svn_url":"https://github.com/rtoal/polyglot","homepage":null,"size":291,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/42"},"html":{"href":"https://github.com/rtoal/polyglot/pull/42"},"issue":{"href":"https://api.github.com/repos/rtoal/polyglot/issues/42"},"comments":{"href":"https://api.github.com/repos/rtoal/polyglot/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rtoal/polyglot/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/rtoal/polyglot/statuses/245f84812d4f0b3466d339ae8838a4671bffc78e"}}}}