{"action":"created","comment":{"url":"https://api.github.com/repos/sparrell/sFractals/pulls/comments/46764151","id":46764151,"diff_hunk":"@@ -0,0 +1,96 @@\n+%%%-------------------------------------------------------------------\n+%%% @author Duncan Sparrell\n+%%% @copyright (C) 2015, sFractal Consulting LLC\n+%%% \n+%%%-------------------------------------------------------------------\n+\n+-module(compute_points).\n+-author(\"Duncan Sparrell\").\n+%% routines for making fractals\n+\n+%% public API\n+-export([ \n+          compute_iteration_value/8 \n+          ]).\n+\n+%% expose functions for test\n+-export([ \n+          new_imaginary_c/1\n+        , new_real_c/1\n+        , newImaginaryZ/1\n+        , new_real_z/1\n+        ]).\n+ \n+%%%%%%%%%%\n+%% compute_iteration_value computes fractal value and returns iteration count\n+%%%%%%%%%%\n+compute_iteration_value(_FractalAlg,\n+                      _CReal, \n+                      _CImaginary, \n+                      _ZReal,\n+                      _ZImaginary, \n+                      IterCount,                     %for this clause only need IterCount and Max\n+                      MaxIterationThreshold, \n+                      _BailoutThreshold )\n+        when IterCount >= MaxIterationThreshold ->   % reached iteration limit so return count=limit\n+    MaxIterationThreshold;\n+\n+%% function clause for exceeding bound\n+compute_iteration_value(_FractalALg,\n+                      _CReal,\n+                      _CImaginary, \n+                      ZReal,\n+                      ZImaginary, \n+                      IterCount, \n+                      _MaxIterationThreshold, \n+                      BailoutThreshold ) \n+        when ((ZReal*ZReal)+(ZImaginary*ZImaginary)) > BailoutThreshold -> \n+    %bailout exceeded so return iterCount\n+    IterCount;\n+\n+%% function clause for recursing further\n+compute_iteration_value(FractalAlg,\n+                      CReal,\n+                      CImaginary, \n+                      ZReal,\n+                      ZImaginary, \n+                      IterCount, \n+                      MaxIterationThreshold, \n+                      BailoutThreshold ) ->\n+\n+    % compute new Z and C based on fractal algorithm used\n+    ZCParams      = {FractalAlg,CReal,CImaginary, ZReal,ZImaginary},\n+    NewZReal      = new_real_z(ZCParams),\n+    NewZImaginary = newImaginaryZ(ZCParams),\n+    NewCReal      = new_real_c(ZCParams),\n+    NewCImaginary = new_imaginary_c(ZCParams),\n+\n+    compute_iteration_value(FractalAlg,\n+                          NewCReal,\n+                          NewCImaginary, ","path":"src/compute_points.erl","position":70,"original_position":70,"commit_id":"809e8a1697c4f99186f439c78110b276ec4f0a64","original_commit_id":"809e8a1697c4f99186f439c78110b276ec4f0a64","user":{"login":"gadgetci","id":10134338,"avatar_url":"https://avatars.githubusercontent.com/u/10134338?v=3","gravatar_id":"","url":"https://api.github.com/users/gadgetci","html_url":"https://github.com/gadgetci","followers_url":"https://api.github.com/users/gadgetci/followers","following_url":"https://api.github.com/users/gadgetci/following{/other_user}","gists_url":"https://api.github.com/users/gadgetci/gists{/gist_id}","starred_url":"https://api.github.com/users/gadgetci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadgetci/subscriptions","organizations_url":"https://api.github.com/users/gadgetci/orgs","repos_url":"https://api.github.com/users/gadgetci/repos","events_url":"https://api.github.com/users/gadgetci/events{/privacy}","received_events_url":"https://api.github.com/users/gadgetci/received_events","type":"User","site_admin":false},"body":"According to **Elvis**:\n> Line 70 has 1 trailing whitespace characters.","created_at":"2015-12-05T22:47:48Z","updated_at":"2015-12-05T22:47:48Z","html_url":"https://github.com/sparrell/sFractals/pull/61#discussion_r46764151","pull_request_url":"https://api.github.com/repos/sparrell/sFractals/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/comments/46764151"},"html":{"href":"https://github.com/sparrell/sFractals/pull/61#discussion_r46764151"},"pull_request":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/sparrell/sFractals/pulls/61","id":52741248,"html_url":"https://github.com/sparrell/sFractals/pull/61","diff_url":"https://github.com/sparrell/sFractals/pull/61.diff","patch_url":"https://github.com/sparrell/sFractals/pull/61.patch","issue_url":"https://api.github.com/repos/sparrell/sFractals/issues/61","number":61,"state":"open","locked":false,"title":"Otp start","user":{"login":"sparrell","id":1723279,"avatar_url":"https://avatars.githubusercontent.com/u/1723279?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrell","html_url":"https://github.com/sparrell","followers_url":"https://api.github.com/users/sparrell/followers","following_url":"https://api.github.com/users/sparrell/following{/other_user}","gists_url":"https://api.github.com/users/sparrell/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrell/subscriptions","organizations_url":"https://api.github.com/users/sparrell/orgs","repos_url":"https://api.github.com/users/sparrell/repos","events_url":"https://api.github.com/users/sparrell/events{/privacy}","received_events_url":"https://api.github.com/users/sparrell/received_events","type":"User","site_admin":false},"body":"server runs","created_at":"2015-12-05T01:06:06Z","updated_at":"2015-12-05T22:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab982d8a8998f57154d6c5e70e4512f8829cbc8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sparrell/sFractals/pulls/61/commits","review_comments_url":"https://api.github.com/repos/sparrell/sFractals/pulls/61/comments","review_comment_url":"https://api.github.com/repos/sparrell/sFractals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sparrell/sFractals/issues/61/comments","statuses_url":"https://api.github.com/repos/sparrell/sFractals/statuses/809e8a1697c4f99186f439c78110b276ec4f0a64","head":{"label":"sparrell:otp-start","ref":"otp-start","sha":"809e8a1697c4f99186f439c78110b276ec4f0a64","user":{"login":"sparrell","id":1723279,"avatar_url":"https://avatars.githubusercontent.com/u/1723279?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrell","html_url":"https://github.com/sparrell","followers_url":"https://api.github.com/users/sparrell/followers","following_url":"https://api.github.com/users/sparrell/following{/other_user}","gists_url":"https://api.github.com/users/sparrell/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrell/subscriptions","organizations_url":"https://api.github.com/users/sparrell/orgs","repos_url":"https://api.github.com/users/sparrell/repos","events_url":"https://api.github.com/users/sparrell/events{/privacy}","received_events_url":"https://api.github.com/users/sparrell/received_events","type":"User","site_admin":false},"repo":{"id":41819741,"name":"sFractals","full_name":"sparrell/sFractals","owner":{"login":"sparrell","id":1723279,"avatar_url":"https://avatars.githubusercontent.com/u/1723279?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrell","html_url":"https://github.com/sparrell","followers_url":"https://api.github.com/users/sparrell/followers","following_url":"https://api.github.com/users/sparrell/following{/other_user}","gists_url":"https://api.github.com/users/sparrell/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrell/subscriptions","organizations_url":"https://api.github.com/users/sparrell/orgs","repos_url":"https://api.github.com/users/sparrell/repos","events_url":"https://api.github.com/users/sparrell/events{/privacy}","received_events_url":"https://api.github.com/users/sparrell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sparrell/sFractals","description":"play with erlang, rebar3, and fractals","fork":false,"url":"https://api.github.com/repos/sparrell/sFractals","forks_url":"https://api.github.com/repos/sparrell/sFractals/forks","keys_url":"https://api.github.com/repos/sparrell/sFractals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparrell/sFractals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparrell/sFractals/teams","hooks_url":"https://api.github.com/repos/sparrell/sFractals/hooks","issue_events_url":"https://api.github.com/repos/sparrell/sFractals/issues/events{/number}","events_url":"https://api.github.com/repos/sparrell/sFractals/events","assignees_url":"https://api.github.com/repos/sparrell/sFractals/assignees{/user}","branches_url":"https://api.github.com/repos/sparrell/sFractals/branches{/branch}","tags_url":"https://api.github.com/repos/sparrell/sFractals/tags","blobs_url":"https://api.github.com/repos/sparrell/sFractals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparrell/sFractals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparrell/sFractals/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparrell/sFractals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparrell/sFractals/statuses/{sha}","languages_url":"https://api.github.com/repos/sparrell/sFractals/languages","stargazers_url":"https://api.github.com/repos/sparrell/sFractals/stargazers","contributors_url":"https://api.github.com/repos/sparrell/sFractals/contributors","subscribers_url":"https://api.github.com/repos/sparrell/sFractals/subscribers","subscription_url":"https://api.github.com/repos/sparrell/sFractals/subscription","commits_url":"https://api.github.com/repos/sparrell/sFractals/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparrell/sFractals/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparrell/sFractals/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparrell/sFractals/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparrell/sFractals/contents/{+path}","compare_url":"https://api.github.com/repos/sparrell/sFractals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparrell/sFractals/merges","archive_url":"https://api.github.com/repos/sparrell/sFractals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparrell/sFractals/downloads","issues_url":"https://api.github.com/repos/sparrell/sFractals/issues{/number}","pulls_url":"https://api.github.com/repos/sparrell/sFractals/pulls{/number}","milestones_url":"https://api.github.com/repos/sparrell/sFractals/milestones{/number}","notifications_url":"https://api.github.com/repos/sparrell/sFractals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparrell/sFractals/labels{/name}","releases_url":"https://api.github.com/repos/sparrell/sFractals/releases{/id}","created_at":"2015-09-02T18:31:21Z","updated_at":"2015-10-21T14:12:26Z","pushed_at":"2015-12-05T22:47:35Z","git_url":"git://github.com/sparrell/sFractals.git","ssh_url":"git@github.com:sparrell/sFractals.git","clone_url":"https://github.com/sparrell/sFractals.git","svn_url":"https://github.com/sparrell/sFractals","homepage":null,"size":3621,"stargazers_count":1,"watchers_count":1,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":1,"default_branch":"master"}},"base":{"label":"sparrell:master","ref":"master","sha":"60e413eada134241f8ce828a5c350250304abcb3","user":{"login":"sparrell","id":1723279,"avatar_url":"https://avatars.githubusercontent.com/u/1723279?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrell","html_url":"https://github.com/sparrell","followers_url":"https://api.github.com/users/sparrell/followers","following_url":"https://api.github.com/users/sparrell/following{/other_user}","gists_url":"https://api.github.com/users/sparrell/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrell/subscriptions","organizations_url":"https://api.github.com/users/sparrell/orgs","repos_url":"https://api.github.com/users/sparrell/repos","events_url":"https://api.github.com/users/sparrell/events{/privacy}","received_events_url":"https://api.github.com/users/sparrell/received_events","type":"User","site_admin":false},"repo":{"id":41819741,"name":"sFractals","full_name":"sparrell/sFractals","owner":{"login":"sparrell","id":1723279,"avatar_url":"https://avatars.githubusercontent.com/u/1723279?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrell","html_url":"https://github.com/sparrell","followers_url":"https://api.github.com/users/sparrell/followers","following_url":"https://api.github.com/users/sparrell/following{/other_user}","gists_url":"https://api.github.com/users/sparrell/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrell/subscriptions","organizations_url":"https://api.github.com/users/sparrell/orgs","repos_url":"https://api.github.com/users/sparrell/repos","events_url":"https://api.github.com/users/sparrell/events{/privacy}","received_events_url":"https://api.github.com/users/sparrell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sparrell/sFractals","description":"play with erlang, rebar3, and fractals","fork":false,"url":"https://api.github.com/repos/sparrell/sFractals","forks_url":"https://api.github.com/repos/sparrell/sFractals/forks","keys_url":"https://api.github.com/repos/sparrell/sFractals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparrell/sFractals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparrell/sFractals/teams","hooks_url":"https://api.github.com/repos/sparrell/sFractals/hooks","issue_events_url":"https://api.github.com/repos/sparrell/sFractals/issues/events{/number}","events_url":"https://api.github.com/repos/sparrell/sFractals/events","assignees_url":"https://api.github.com/repos/sparrell/sFractals/assignees{/user}","branches_url":"https://api.github.com/repos/sparrell/sFractals/branches{/branch}","tags_url":"https://api.github.com/repos/sparrell/sFractals/tags","blobs_url":"https://api.github.com/repos/sparrell/sFractals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparrell/sFractals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparrell/sFractals/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparrell/sFractals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparrell/sFractals/statuses/{sha}","languages_url":"https://api.github.com/repos/sparrell/sFractals/languages","stargazers_url":"https://api.github.com/repos/sparrell/sFractals/stargazers","contributors_url":"https://api.github.com/repos/sparrell/sFractals/contributors","subscribers_url":"https://api.github.com/repos/sparrell/sFractals/subscribers","subscription_url":"https://api.github.com/repos/sparrell/sFractals/subscription","commits_url":"https://api.github.com/repos/sparrell/sFractals/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparrell/sFractals/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparrell/sFractals/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparrell/sFractals/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparrell/sFractals/contents/{+path}","compare_url":"https://api.github.com/repos/sparrell/sFractals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparrell/sFractals/merges","archive_url":"https://api.github.com/repos/sparrell/sFractals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparrell/sFractals/downloads","issues_url":"https://api.github.com/repos/sparrell/sFractals/issues{/number}","pulls_url":"https://api.github.com/repos/sparrell/sFractals/pulls{/number}","milestones_url":"https://api.github.com/repos/sparrell/sFractals/milestones{/number}","notifications_url":"https://api.github.com/repos/sparrell/sFractals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparrell/sFractals/labels{/name}","releases_url":"https://api.github.com/repos/sparrell/sFractals/releases{/id}","created_at":"2015-09-02T18:31:21Z","updated_at":"2015-10-21T14:12:26Z","pushed_at":"2015-12-05T22:47:35Z","git_url":"git://github.com/sparrell/sFractals.git","ssh_url":"git@github.com:sparrell/sFractals.git","clone_url":"https://github.com/sparrell/sFractals.git","svn_url":"https://github.com/sparrell/sFractals","homepage":null,"size":3621,"stargazers_count":1,"watchers_count":1,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/61"},"html":{"href":"https://github.com/sparrell/sFractals/pull/61"},"issue":{"href":"https://api.github.com/repos/sparrell/sFractals/issues/61"},"comments":{"href":"https://api.github.com/repos/sparrell/sFractals/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sparrell/sFractals/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/sparrell/sFractals/statuses/809e8a1697c4f99186f439c78110b276ec4f0a64"}}}}