{"action":"created","comment":{"url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/comments/80367279","id":80367279,"diff_hunk":"@@ -0,0 +1,50 @@\n+\n+#include <math.h>\n+#include \"Enonce/coordonnees.h\"\n+\n+Coordonnees::Coordonnees(double latitude, double longitude) : m_latitude(latitude), m_longitude(longitude)\n+{\n+}\n+\n+double Coordonnees::getLatitude() const\n+{\n+\treturn (this->m_latitude);\n+}\n+\n+void Coordonnees::setLatitude(double latitude)\n+{\n+\tthis->m_latitude = latitude;\n+}\n+\n+double Coordonnees::getLongitude() const\n+{\n+\treturn (this->m_longitude);\n+}\n+\n+void Coordonnees::setLongitude(double longitude)\n+{\n+\tthis->m_longitude = longitude;\n+}\n+\n+bool Coordonnees::is_valide_coord(double p_latitude, double p_longitude)\n+{\n+\tif (p_latitude < -90 || p_latitude > 90)\n+\t\treturn (false);\n+\tif (p_longitude < -180 || p_longitude > 180)\n+\t\treturn (false);\n+\treturn (true);\n+}\n+\n+double Coordonnees::operator-(const Coordonnees & other) const\n+{\n+\tdouble rayon = 6371;\n+\tdouble pi = 3.141592;\n+\n+\treturn (2.0 * rayon * asin(sqrt(pow(sin(((other.getLatitude() * pi / 180.0) - (this->getLatitude()  * pi / 180.0)) / 2.0), 2.0)  + cos((this->getLatitude() * pi / 180.0)) * cos((other.getLatitude() * pi / 180.0)) * pow(sin(((other.getLongitude() * pi / 180.0) - (this->getLongitude() * pi / 180.0)) / 2.0), 2.0))));","path":"AlgoTP1/coordonnees.cpp","position":43,"original_position":43,"commit_id":"5b8f9805c8d8f54aa91354f3fcb3bc3faaaf42c5","original_commit_id":"5b8f9805c8d8f54aa91354f3fcb3bc3faaaf42c5","user":{"login":"shrodingers","id":15873430,"avatar_url":"https://avatars.githubusercontent.com/u/15873430?v=3","gravatar_id":"","url":"https://api.github.com/users/shrodingers","html_url":"https://github.com/shrodingers","followers_url":"https://api.github.com/users/shrodingers/followers","following_url":"https://api.github.com/users/shrodingers/following{/other_user}","gists_url":"https://api.github.com/users/shrodingers/gists{/gist_id}","starred_url":"https://api.github.com/users/shrodingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrodingers/subscriptions","organizations_url":"https://api.github.com/users/shrodingers/orgs","repos_url":"https://api.github.com/users/shrodingers/repos","events_url":"https://api.github.com/users/shrodingers/events{/privacy}","received_events_url":"https://api.github.com/users/shrodingers/received_events","type":"User","site_admin":false},"body":"retourne à la ligne, sinon c'est illisible ;)","created_at":"2016-09-24T19:33:04Z","updated_at":"2016-09-24T19:33:04Z","html_url":"https://github.com/shrodingers/AlgorithmeTPs/pull/4#discussion_r80367279","pull_request_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/comments/80367279"},"html":{"href":"https://github.com/shrodingers/AlgorithmeTPs/pull/4#discussion_r80367279"},"pull_request":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4","id":86614790,"html_url":"https://github.com/shrodingers/AlgorithmeTPs/pull/4","diff_url":"https://github.com/shrodingers/AlgorithmeTPs/pull/4.diff","patch_url":"https://github.com/shrodingers/AlgorithmeTPs/pull/4.patch","issue_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/4","number":4,"state":"open","locked":false,"title":"coordonnees method & main for test","user":{"login":"potierg","id":18525336,"avatar_url":"https://avatars.githubusercontent.com/u/18525336?v=3","gravatar_id":"","url":"https://api.github.com/users/potierg","html_url":"https://github.com/potierg","followers_url":"https://api.github.com/users/potierg/followers","following_url":"https://api.github.com/users/potierg/following{/other_user}","gists_url":"https://api.github.com/users/potierg/gists{/gist_id}","starred_url":"https://api.github.com/users/potierg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potierg/subscriptions","organizations_url":"https://api.github.com/users/potierg/orgs","repos_url":"https://api.github.com/users/potierg/repos","events_url":"https://api.github.com/users/potierg/events{/privacy}","received_events_url":"https://api.github.com/users/potierg/received_events","type":"User","site_admin":false},"body":"Added coordonnees.cpp\r\nAdded main for test","created_at":"2016-09-24T10:46:47Z","updated_at":"2016-09-24T19:33:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a427534b0aa80c9b1d5ffdc701923b834ab2b55","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4/commits","review_comments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4/comments","review_comment_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/4/comments","statuses_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/statuses/5b8f9805c8d8f54aa91354f3fcb3bc3faaaf42c5","head":{"label":"shrodingers:potierg/coordonnees","ref":"potierg/coordonnees","sha":"5b8f9805c8d8f54aa91354f3fcb3bc3faaaf42c5","user":{"login":"shrodingers","id":15873430,"avatar_url":"https://avatars.githubusercontent.com/u/15873430?v=3","gravatar_id":"","url":"https://api.github.com/users/shrodingers","html_url":"https://github.com/shrodingers","followers_url":"https://api.github.com/users/shrodingers/followers","following_url":"https://api.github.com/users/shrodingers/following{/other_user}","gists_url":"https://api.github.com/users/shrodingers/gists{/gist_id}","starred_url":"https://api.github.com/users/shrodingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrodingers/subscriptions","organizations_url":"https://api.github.com/users/shrodingers/orgs","repos_url":"https://api.github.com/users/shrodingers/repos","events_url":"https://api.github.com/users/shrodingers/events{/privacy}","received_events_url":"https://api.github.com/users/shrodingers/received_events","type":"User","site_admin":false},"repo":{"id":68546247,"name":"AlgorithmeTPs","full_name":"shrodingers/AlgorithmeTPs","owner":{"login":"shrodingers","id":15873430,"avatar_url":"https://avatars.githubusercontent.com/u/15873430?v=3","gravatar_id":"","url":"https://api.github.com/users/shrodingers","html_url":"https://github.com/shrodingers","followers_url":"https://api.github.com/users/shrodingers/followers","following_url":"https://api.github.com/users/shrodingers/following{/other_user}","gists_url":"https://api.github.com/users/shrodingers/gists{/gist_id}","starred_url":"https://api.github.com/users/shrodingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrodingers/subscriptions","organizations_url":"https://api.github.com/users/shrodingers/orgs","repos_url":"https://api.github.com/users/shrodingers/repos","events_url":"https://api.github.com/users/shrodingers/events{/privacy}","received_events_url":"https://api.github.com/users/shrodingers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shrodingers/AlgorithmeTPs","description":"Tps for Ulaval university","fork":false,"url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs","forks_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/forks","keys_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/teams","hooks_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/hooks","issue_events_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/events{/number}","events_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/events","assignees_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/assignees{/user}","branches_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/branches{/branch}","tags_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/tags","blobs_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/refs{/sha}","trees_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/statuses/{sha}","languages_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/languages","stargazers_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/stargazers","contributors_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/contributors","subscribers_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/subscribers","subscription_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/subscription","commits_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/commits{/sha}","git_commits_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/commits{/sha}","comments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/comments{/number}","issue_comment_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/comments{/number}","contents_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/contents/{+path}","compare_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/merges","archive_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/downloads","issues_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues{/number}","pulls_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls{/number}","milestones_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/milestones{/number}","notifications_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/labels{/name}","releases_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/releases{/id}","deployments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/deployments","created_at":"2016-09-18T20:44:20Z","updated_at":"2016-09-18T20:51:25Z","pushed_at":"2016-09-24T10:46:47Z","git_url":"git://github.com/shrodingers/AlgorithmeTPs.git","ssh_url":"git@github.com:shrodingers/AlgorithmeTPs.git","clone_url":"https://github.com/shrodingers/AlgorithmeTPs.git","svn_url":"https://github.com/shrodingers/AlgorithmeTPs","homepage":null,"size":8551,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"shrodingers:master","ref":"master","sha":"6a8df547a879ef08dadca034b5f42ec00a572048","user":{"login":"shrodingers","id":15873430,"avatar_url":"https://avatars.githubusercontent.com/u/15873430?v=3","gravatar_id":"","url":"https://api.github.com/users/shrodingers","html_url":"https://github.com/shrodingers","followers_url":"https://api.github.com/users/shrodingers/followers","following_url":"https://api.github.com/users/shrodingers/following{/other_user}","gists_url":"https://api.github.com/users/shrodingers/gists{/gist_id}","starred_url":"https://api.github.com/users/shrodingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrodingers/subscriptions","organizations_url":"https://api.github.com/users/shrodingers/orgs","repos_url":"https://api.github.com/users/shrodingers/repos","events_url":"https://api.github.com/users/shrodingers/events{/privacy}","received_events_url":"https://api.github.com/users/shrodingers/received_events","type":"User","site_admin":false},"repo":{"id":68546247,"name":"AlgorithmeTPs","full_name":"shrodingers/AlgorithmeTPs","owner":{"login":"shrodingers","id":15873430,"avatar_url":"https://avatars.githubusercontent.com/u/15873430?v=3","gravatar_id":"","url":"https://api.github.com/users/shrodingers","html_url":"https://github.com/shrodingers","followers_url":"https://api.github.com/users/shrodingers/followers","following_url":"https://api.github.com/users/shrodingers/following{/other_user}","gists_url":"https://api.github.com/users/shrodingers/gists{/gist_id}","starred_url":"https://api.github.com/users/shrodingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrodingers/subscriptions","organizations_url":"https://api.github.com/users/shrodingers/orgs","repos_url":"https://api.github.com/users/shrodingers/repos","events_url":"https://api.github.com/users/shrodingers/events{/privacy}","received_events_url":"https://api.github.com/users/shrodingers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shrodingers/AlgorithmeTPs","description":"Tps for Ulaval university","fork":false,"url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs","forks_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/forks","keys_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/teams","hooks_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/hooks","issue_events_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/events{/number}","events_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/events","assignees_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/assignees{/user}","branches_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/branches{/branch}","tags_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/tags","blobs_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/refs{/sha}","trees_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/statuses/{sha}","languages_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/languages","stargazers_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/stargazers","contributors_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/contributors","subscribers_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/subscribers","subscription_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/subscription","commits_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/commits{/sha}","git_commits_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/git/commits{/sha}","comments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/comments{/number}","issue_comment_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/comments{/number}","contents_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/contents/{+path}","compare_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/merges","archive_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/downloads","issues_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues{/number}","pulls_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls{/number}","milestones_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/milestones{/number}","notifications_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/labels{/name}","releases_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/releases{/id}","deployments_url":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/deployments","created_at":"2016-09-18T20:44:20Z","updated_at":"2016-09-18T20:51:25Z","pushed_at":"2016-09-24T10:46:47Z","git_url":"git://github.com/shrodingers/AlgorithmeTPs.git","ssh_url":"git@github.com:shrodingers/AlgorithmeTPs.git","clone_url":"https://github.com/shrodingers/AlgorithmeTPs.git","svn_url":"https://github.com/shrodingers/AlgorithmeTPs","homepage":null,"size":8551,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4"},"html":{"href":"https://github.com/shrodingers/AlgorithmeTPs/pull/4"},"issue":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/4"},"comments":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/shrodingers/AlgorithmeTPs/statuses/5b8f9805c8d8f54aa91354f3fcb3bc3faaaf42c5"}}}}
{"actor":{"display_login":"shrodingers"}}