{"action":"created","comment":{"url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/comments/175458520","pull_request_review_id":104987006,"id":175458520,"diff_hunk":"@@ -0,0 +1,110 @@\n+package ru.spbstu.kspt.task1;\n+\n+import org.apache.logging.log4j.LogManager;\n+import org.apache.logging.log4j.Logger;\n+\n+/**\n+ * Quaternion class\n+ */\n+public class Quaternion {\n+\n+    private static final Logger logger = LogManager.getLogger(Quaternion.class);\n+\n+\n+        public double a;\n+        public double b;\n+        public double c;\n+        public double d;\n+\n+        public Quaternion(double a, double b, double c, double d) {\n+            this.a = a;\n+            this.b = b;\n+            this.c = c;\n+            this.d = d;\n+        }\n+\n+\n+        public Quaternion conjugate() {\n+            return new Quaternion(a, -b, -c, -d);\n+        }\n+\n+        public double abs() {\n+            return Math.sqrt(a * a + b * b + c * c + d * d);\n+        }\n+\n+        public Quaternion inverse() throws ArithmeticException {\n+            return Quaternion.divide(this.conjugate(), a * a + b * b + c * c + d * d);\n+        }\n+\n+        public  Quaternion plus(Quaternion p, Quaternion q) {\n+            return new Quaternion(p.a + q.a, p.b + q.b, p.c + q.c, p.d + q.d);\n+        }\n+\n+        public Quaternion minus(Quaternion p, Quaternion q) {\n+            return new Quaternion(p.a - q.a, p.b - q.b, p.c - q.c, p.d - q.d);\n+        }\n+\n+        public Quaternion multConst(Quaternion p, double cst) {\n+            return new Quaternion(p.a * cst, p.b * cst, p.c * cst, p.d * cst);\n+        }\n+\n+        public Quaternion mult(Quaternion p, Quaternion q) {\n+            return new Quaternion(p.a * q.a - p.b * q.b - p.c * q.c - p.d * q.d,\n+                    p.a * q.b + p.b * q.a + p.c * q.d - p.d * q.c,\n+                    p.a * q.c - p.b * q.d + p.c * q.a + p.d * q.b,\n+                    p.a * q.d + p.b * q.c - p.c * q.b + p.d * q.a);\n+        }\n+\n+        public static Quaternion divide(Quaternion p, double divisor) throws ArithmeticException {\n+            if (divisor == 0) throw new ArithmeticException(\"division by zero\");\n+            return new Quaternion(p.a / divisor, p.b / divisor, p.c / divisor, p.d / divisor);\n+        }\n+\n+        @Override\n+        public boolean equals(Object obj){\n+            if (this == obj) return true;\n+            if (obj instanceof Quaternion){\n+                Quaternion other = (Quaternion) obj;\n+                return a == other.a && b == other.b && c == other.c && d == other.d;\n+            }\n+            return false;\n+        }\n+\n+        @Override\n+        public int hashCode() {\n+            int result;\n+            long boo;\n+            boo = Double.doubleToLongBits(a);\n+            result = (int) (boo ^ (boo >>> 32));\n+            boo = Double.doubleToLongBits(b);\n+            result = 31 * result + (int) (boo ^ (boo >>> 32));\n+            boo = Double.doubleToLongBits(c);\n+            result = 31 * result + (int) (boo ^ (boo >>> 32));\n+            boo = Double.doubleToLongBits(d);\n+            result = 31 * result + (int) (boo ^ (boo >>> 32));\n+            return result;\n+        }\n+\n+\n+        @Override\n+        public String toString() {\n+            return a +\n+                ((b < 0)? \" - \" : \" + \") + Math.abs(b) + \"*i\" +\n+                ((c < 0)? \" - \" : \" + \") + Math.abs(c) + \"*j\" +\n+                ((d < 0)? \" - \" : \" + \") + Math.abs(d) + \"*k\";\n+          }\n+\n+    public static Quaternion rotation(Axis d, double angle) {","path":"src/main/java/ru/spbstu/kspt/task1/Quaternion.java","position":97,"original_position":97,"commit_id":"92298e893801d206037f78b31608f4ad07bc9a4a","original_commit_id":"92298e893801d206037f78b31608f4ad07bc9a4a","user":{"login":"h31","id":3375923,"avatar_url":"https://avatars0.githubusercontent.com/u/3375923?v=4","gravatar_id":"","url":"https://api.github.com/users/h31","html_url":"https://github.com/h31","followers_url":"https://api.github.com/users/h31/followers","following_url":"https://api.github.com/users/h31/following{/other_user}","gists_url":"https://api.github.com/users/h31/gists{/gist_id}","starred_url":"https://api.github.com/users/h31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h31/subscriptions","organizations_url":"https://api.github.com/users/h31/orgs","repos_url":"https://api.github.com/users/h31/repos","events_url":"https://api.github.com/users/h31/events{/privacy}","received_events_url":"https://api.github.com/users/h31/received_events","type":"User","site_admin":false},"body":"Непонятное имя метода. Если это построение кватерниона по оси и углу поворота, то так и стоит назвать.","created_at":"2018-03-19T14:41:25Z","updated_at":"2018-03-19T14:49:04Z","html_url":"https://github.com/h31/ProgrammingLabTask1/pull/23#discussion_r175458520","pull_request_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/comments/175458520"},"html":{"href":"https://github.com/h31/ProgrammingLabTask1/pull/23#discussion_r175458520"},"pull_request":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23","id":174480010,"html_url":"https://github.com/h31/ProgrammingLabTask1/pull/23","diff_url":"https://github.com/h31/ProgrammingLabTask1/pull/23.diff","patch_url":"https://github.com/h31/ProgrammingLabTask1/pull/23.patch","issue_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/23","number":23,"state":"open","locked":false,"title":"Александра Трубкина, Кватернион","user":{"login":"AlexandraTrubkina","id":31704032,"avatar_url":"https://avatars1.githubusercontent.com/u/31704032?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandraTrubkina","html_url":"https://github.com/AlexandraTrubkina","followers_url":"https://api.github.com/users/AlexandraTrubkina/followers","following_url":"https://api.github.com/users/AlexandraTrubkina/following{/other_user}","gists_url":"https://api.github.com/users/AlexandraTrubkina/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandraTrubkina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandraTrubkina/subscriptions","organizations_url":"https://api.github.com/users/AlexandraTrubkina/orgs","repos_url":"https://api.github.com/users/AlexandraTrubkina/repos","events_url":"https://api.github.com/users/AlexandraTrubkina/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandraTrubkina/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-12T20:06:11Z","updated_at":"2018-03-19T14:49:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3ac43d4d98367a2fd0e33ae094451d8f804ac13","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":863293388,"url":"https://api.github.com/repos/h31/ProgrammingLabTask1/labels/good","name":"good","color":"90e56b","default":false},{"id":865683514,"url":"https://api.github.com/repos/h31/ProgrammingLabTask1/labels/penalty","name":"penalty","color":"f9d0c4","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23/commits","review_comments_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23/comments","review_comment_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/23/comments","statuses_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/statuses/92298e893801d206037f78b31608f4ad07bc9a4a","head":{"label":"AlexandraTrubkina:master","ref":"master","sha":"92298e893801d206037f78b31608f4ad07bc9a4a","user":{"login":"AlexandraTrubkina","id":31704032,"avatar_url":"https://avatars1.githubusercontent.com/u/31704032?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandraTrubkina","html_url":"https://github.com/AlexandraTrubkina","followers_url":"https://api.github.com/users/AlexandraTrubkina/followers","following_url":"https://api.github.com/users/AlexandraTrubkina/following{/other_user}","gists_url":"https://api.github.com/users/AlexandraTrubkina/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandraTrubkina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandraTrubkina/subscriptions","organizations_url":"https://api.github.com/users/AlexandraTrubkina/orgs","repos_url":"https://api.github.com/users/AlexandraTrubkina/repos","events_url":"https://api.github.com/users/AlexandraTrubkina/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandraTrubkina/received_events","type":"User","site_admin":false},"repo":{"id":123706649,"name":"ProgrammingLabTask1","full_name":"AlexandraTrubkina/ProgrammingLabTask1","owner":{"login":"AlexandraTrubkina","id":31704032,"avatar_url":"https://avatars1.githubusercontent.com/u/31704032?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandraTrubkina","html_url":"https://github.com/AlexandraTrubkina","followers_url":"https://api.github.com/users/AlexandraTrubkina/followers","following_url":"https://api.github.com/users/AlexandraTrubkina/following{/other_user}","gists_url":"https://api.github.com/users/AlexandraTrubkina/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandraTrubkina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandraTrubkina/subscriptions","organizations_url":"https://api.github.com/users/AlexandraTrubkina/orgs","repos_url":"https://api.github.com/users/AlexandraTrubkina/repos","events_url":"https://api.github.com/users/AlexandraTrubkina/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandraTrubkina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexandraTrubkina/ProgrammingLabTask1","description":"Programming Lab (Task 1)","fork":true,"url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1","forks_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/forks","keys_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/teams","hooks_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/hooks","issue_events_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/issues/events{/number}","events_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/events","assignees_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/assignees{/user}","branches_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/branches{/branch}","tags_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/tags","blobs_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/languages","stargazers_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/stargazers","contributors_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/contributors","subscribers_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/subscribers","subscription_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/subscription","commits_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/contents/{+path}","compare_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/merges","archive_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/downloads","issues_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/issues{/number}","pulls_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/labels{/name}","releases_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/releases{/id}","deployments_url":"https://api.github.com/repos/AlexandraTrubkina/ProgrammingLabTask1/deployments","created_at":"2018-03-03T15:53:25Z","updated_at":"2018-03-18T21:51:45Z","pushed_at":"2018-03-18T21:51:44Z","git_url":"git://github.com/AlexandraTrubkina/ProgrammingLabTask1.git","ssh_url":"git@github.com:AlexandraTrubkina/ProgrammingLabTask1.git","clone_url":"https://github.com/AlexandraTrubkina/ProgrammingLabTask1.git","svn_url":"https://github.com/AlexandraTrubkina/ProgrammingLabTask1","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"h31:master","ref":"master","sha":"25d075fc8d8d328e831d476fd5eaf0bfe6ba5df3","user":{"login":"h31","id":3375923,"avatar_url":"https://avatars0.githubusercontent.com/u/3375923?v=4","gravatar_id":"","url":"https://api.github.com/users/h31","html_url":"https://github.com/h31","followers_url":"https://api.github.com/users/h31/followers","following_url":"https://api.github.com/users/h31/following{/other_user}","gists_url":"https://api.github.com/users/h31/gists{/gist_id}","starred_url":"https://api.github.com/users/h31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h31/subscriptions","organizations_url":"https://api.github.com/users/h31/orgs","repos_url":"https://api.github.com/users/h31/repos","events_url":"https://api.github.com/users/h31/events{/privacy}","received_events_url":"https://api.github.com/users/h31/received_events","type":"User","site_admin":false},"repo":{"id":121282846,"name":"ProgrammingLabTask1","full_name":"h31/ProgrammingLabTask1","owner":{"login":"h31","id":3375923,"avatar_url":"https://avatars0.githubusercontent.com/u/3375923?v=4","gravatar_id":"","url":"https://api.github.com/users/h31","html_url":"https://github.com/h31","followers_url":"https://api.github.com/users/h31/followers","following_url":"https://api.github.com/users/h31/following{/other_user}","gists_url":"https://api.github.com/users/h31/gists{/gist_id}","starred_url":"https://api.github.com/users/h31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h31/subscriptions","organizations_url":"https://api.github.com/users/h31/orgs","repos_url":"https://api.github.com/users/h31/repos","events_url":"https://api.github.com/users/h31/events{/privacy}","received_events_url":"https://api.github.com/users/h31/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/h31/ProgrammingLabTask1","description":"Programming Lab (Task 1)","fork":false,"url":"https://api.github.com/repos/h31/ProgrammingLabTask1","forks_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/forks","keys_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/teams","hooks_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/hooks","issue_events_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/events{/number}","events_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/events","assignees_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/assignees{/user}","branches_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/branches{/branch}","tags_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/tags","blobs_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/git/refs{/sha}","trees_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/statuses/{sha}","languages_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/languages","stargazers_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/stargazers","contributors_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/contributors","subscribers_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/subscribers","subscription_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/subscription","commits_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/commits{/sha}","git_commits_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/git/commits{/sha}","comments_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/comments{/number}","issue_comment_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/comments{/number}","contents_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/contents/{+path}","compare_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/merges","archive_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/downloads","issues_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues{/number}","pulls_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls{/number}","milestones_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/milestones{/number}","notifications_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/labels{/name}","releases_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/releases{/id}","deployments_url":"https://api.github.com/repos/h31/ProgrammingLabTask1/deployments","created_at":"2018-02-12T18:08:51Z","updated_at":"2018-03-12T18:50:00Z","pushed_at":"2018-03-18T21:51:45Z","git_url":"git://github.com/h31/ProgrammingLabTask1.git","ssh_url":"git@github.com:h31/ProgrammingLabTask1.git","clone_url":"https://github.com/h31/ProgrammingLabTask1.git","svn_url":"https://github.com/h31/ProgrammingLabTask1","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":24,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23"},"html":{"href":"https://github.com/h31/ProgrammingLabTask1/pull/23"},"issue":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/23"},"comments":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/h31/ProgrammingLabTask1/statuses/92298e893801d206037f78b31608f4ad07bc9a4a"}},"author_association":"NONE"}}
{"actor":{"display_login":"h31"}}