{"action":"created","comment":{"url":"https://api.github.com/repos/witheve/Eve/pulls/comments/87440763","pull_request_review_id":8054368,"id":87440763,"diff_hunk":"@@ -55,64 +94,153 @@ class Divide extends TotalFunctionConstraint {\n   }\n }\n \n-class Sin extends TotalFunctionConstraint {\n-  static AttributeMapping = {\n-    \"degrees\": 0,\n-    \"radians\": 1,\n-    \"angle\": 2\n+class Sin extends TrigConstraint {\n+  getReturnValue(args) {\n+      return Math.sin(this.resolveTrigAttributes(args));\n   }\n+}\n \n+class Cos extends TrigConstraint {\n   getReturnValue(args) {\n-    let [degrees, radians, angle] = args;\n-    if (angle !== undefined) {\n-      return this.getAngle(angle);\n-    } else if (degrees !== undefined) {\n-      return Math.sin(degrees * (Math.PI / 180));\n-    } else {\n-      return Math.sin(radians);\n-    }\n+      return Math.cos(this.resolveTrigAttributes(args));\n   }\n+}\n \n-  @deprecated('Please use degrees instead of angle')\n-  getAngle(angle) {\n-    return Math.sin(angle * (Math.PI / 180));\n+class Tan extends TrigConstraint {\n+  getReturnValue(args) {\n+      return Math.tan(this.resolveTrigAttributes(args));\n+  }\n+}\n+\n+class ASin extends ValueOnlyConstraint {\n+  getReturnValue(args) {\n+    return Math.asin(args[0]);\n+  }\n+}\n+\n+class ACos extends ValueOnlyConstraint {\n+  getReturnValue(args) {\n+    return Math.acos(args[0]);\n+  }\n+}\n+\n+class ATan extends ValueOnlyConstraint {\n+  getReturnValue(args) {\n+    return Math.atan(args[0]);\n   }\n }\n \n-class Cos extends TotalFunctionConstraint {\n+\n+class ATan2 extends TotalFunctionConstraint {\n   static AttributeMapping = {\n-    \"degrees\": 0,\n-    \"radians\": 1,\n-    \"angle\": 2\n+    \"x\": 0,\n+    \"y\": 1\n+  }\n+  getReturnValue(args) {\n+    return [Math.atan2(args[0] ,args[1])];\n   }\n+}\n \n+//Hyperbolic Functions\n+class SinH extends ValueOnlyConstraint {\n+  sinh (x: number):number{\n+    var y = Math.exp(x);\n+    return (y - 1 / y) / 2;\n+  }\n+  getReturnValue(args) {\n+    return [this.sinh(args[0])];\n+  }\n+}\n+\n+class CosH extends ValueOnlyConstraint {\n+  cosh (x: number):number{\n+    var y = Math.exp(x);\n+    return (y + 1 / y) / 2;\n+  }\n+  getReturnValue(args) {\n+    return [this.cosh(args[0])];\n+  }\n+}\n+\n+class TanH extends ValueOnlyConstraint {\n+  tanh(x : number) : number {\n+    if (x === Infinity) {\n+      return 1;\n+    } else if (x === -Infinity) {\n+      return -1;\n+    } else {\n+      let y = Math.exp(2 * x);\n+      return (y - 1) / (y + 1);\n+    }\n+  }\n   getReturnValue(args) {\n-    let [degrees, radians, angle] = args;\n-    if (angle !== undefined) {\n-      return this.getAngle(angle);\n-    } else if (degrees !== undefined) {\n-      return Math.cos(degrees * (Math.PI / 180));\n+    return [this.tanh(args[0])];\n+  }\n+}\n+\n+//Inverse Hyperbolic\n+class ASinH extends ValueOnlyConstraint {\n+  asinh (x: number):number{\n+    if (x === -Infinity) {\n+      return x;\n     } else {\n-      return Math.cos(radians);\n+      return Math.log(x + Math.sqrt(x * x + 1));\n     }\n   }\n+  getReturnValue(args) {\n+    return [this.asinh(args[0])];\n+  }\n+}\n \n-  @deprecated('Please use degrees instead of angle')\n-  getAngle(angle) {\n-    return Math.cos(angle * (Math.PI / 180));\n+class ACosH extends ValueOnlyConstraint {\n+  acosh (x: number):number{\n+    //How do we handle number outside of range in Eve? ","path":"src/runtime/providers/math.ts","position":179,"original_position":179,"commit_id":"db486fc744f1a9e114251fac50ff3894443c09cc","original_commit_id":"db486fc744f1a9e114251fac50ff3894443c09cc","user":{"login":"olafleur","id":1068290,"avatar_url":"https://avatars.githubusercontent.com/u/1068290?v=3","gravatar_id":"","url":"https://api.github.com/users/olafleur","html_url":"https://github.com/olafleur","followers_url":"https://api.github.com/users/olafleur/followers","following_url":"https://api.github.com/users/olafleur/following{/other_user}","gists_url":"https://api.github.com/users/olafleur/gists{/gist_id}","starred_url":"https://api.github.com/users/olafleur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olafleur/subscriptions","organizations_url":"https://api.github.com/users/olafleur/orgs","repos_url":"https://api.github.com/users/olafleur/repos","events_url":"https://api.github.com/users/olafleur/events{/privacy}","received_events_url":"https://api.github.com/users/olafleur/received_events","type":"User","site_admin":false},"body":"Syntax error, I guess?","created_at":"2016-11-10T17:12:01Z","updated_at":"2016-11-10T17:14:36Z","html_url":"https://github.com/witheve/Eve/pull/535#discussion_r87440763","pull_request_url":"https://api.github.com/repos/witheve/Eve/pulls/535","_links":{"self":{"href":"https://api.github.com/repos/witheve/Eve/pulls/comments/87440763"},"html":{"href":"https://github.com/witheve/Eve/pull/535#discussion_r87440763"},"pull_request":{"href":"https://api.github.com/repos/witheve/Eve/pulls/535"}}},"pull_request":{"url":"https://api.github.com/repos/witheve/Eve/pulls/535","id":93186526,"html_url":"https://github.com/witheve/Eve/pull/535","diff_url":"https://github.com/witheve/Eve/pull/535.diff","patch_url":"https://github.com/witheve/Eve/pull/535.patch","issue_url":"https://api.github.com/repos/witheve/Eve/issues/535","number":535,"state":"open","locked":false,"title":"Refactor and add various new functions.","user":{"login":"Cormac-Williams","id":19359899,"avatar_url":"https://avatars.githubusercontent.com/u/19359899?v=3","gravatar_id":"","url":"https://api.github.com/users/Cormac-Williams","html_url":"https://github.com/Cormac-Williams","followers_url":"https://api.github.com/users/Cormac-Williams/followers","following_url":"https://api.github.com/users/Cormac-Williams/following{/other_user}","gists_url":"https://api.github.com/users/Cormac-Williams/gists{/gist_id}","starred_url":"https://api.github.com/users/Cormac-Williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cormac-Williams/subscriptions","organizations_url":"https://api.github.com/users/Cormac-Williams/orgs","repos_url":"https://api.github.com/users/Cormac-Williams/repos","events_url":"https://api.github.com/users/Cormac-Williams/events{/privacy}","received_events_url":"https://api.github.com/users/Cormac-Williams/received_events","type":"User","site_admin":false},"body":"As promised. Should also mention that there's a Math_Test.eve file in my examples folder that puts this stuff through its paces.\r\n\r\nFull list of providers is now.\r\n\r\nproviders.provide(\"+\", Add);\r\nproviders.provide(\"-\", Subtract);\r\nproviders.provide(\"*\", Multiply);\r\nproviders.provide(\"/\", Divide);\r\n\r\nproviders.provide(\"log\", Log);\r\nproviders.provide(\"exp\", Exp);\r\n\r\n//Trig and Inverse Trig\r\nproviders.provide(\"sin\", Sin);\r\nproviders.provide(\"cos\", Cos);\r\nproviders.provide(\"tan\", Tan);\r\n\r\nproviders.provide(\"asin\", ASin);\r\nproviders.provide(\"acos\", ACos);\r\nproviders.provide(\"atan\", ATan);\r\n\r\nproviders.provide(\"atan2\", ATan2);\r\n\r\n//Hyperbolic Functions.\r\nproviders.provide(\"sinh\", SinH);\r\nproviders.provide(\"cosh\", CosH);\r\nproviders.provide(\"tanh\", TanH);\r\nproviders.provide(\"asinh\", ASinH);\r\nproviders.provide(\"acosh\", ACosH);\r\nproviders.provide(\"atanh\", ATanH);\r\n\r\n\r\n\r\nproviders.provide(\"floor\", Floor);\r\nproviders.provide(\"ceiling\", Ceiling);\r\n\r\nproviders.provide(\"abs\", Abs);\r\nproviders.provide(\"mod\", Mod);\r\nproviders.provide(\"pow\", Pow);\r\nproviders.provide(\"random\", Random);\r\nproviders.provide(\"range\", Range);\r\nproviders.provide(\"round\", Round);\r\nproviders.provide(\"gaussian\", Gaussian);\r\nproviders.provide(\"to-fixed\", ToFixed);\r\n\r\n//Constants\r\nproviders.provide(\"pi\", PI);\r\nproviders.provide(\"e\", E);\r\nproviders.provide(\"ln2\", LN2);\r\nproviders.provide(\"ln10\", LN10);\r\nproviders.provide(\"log2e\",LOG2E );\r\nproviders.provide(\"log10e\",LOG10E );\r\nproviders.provide(\"sqrt1/2\", SQRT1_2);\r\nproviders.provide(\"sqrt2\", SQRT2);\r\n","created_at":"2016-11-10T16:42:50Z","updated_at":"2016-11-10T17:14:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fcd00ab79e7c30ce77f098386ac6ff7e4d5f4ca","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/witheve/Eve/pulls/535/commits","review_comments_url":"https://api.github.com/repos/witheve/Eve/pulls/535/comments","review_comment_url":"https://api.github.com/repos/witheve/Eve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/witheve/Eve/issues/535/comments","statuses_url":"https://api.github.com/repos/witheve/Eve/statuses/db486fc744f1a9e114251fac50ff3894443c09cc","head":{"label":"Cormac-Williams:master","ref":"master","sha":"db486fc744f1a9e114251fac50ff3894443c09cc","user":{"login":"Cormac-Williams","id":19359899,"avatar_url":"https://avatars.githubusercontent.com/u/19359899?v=3","gravatar_id":"","url":"https://api.github.com/users/Cormac-Williams","html_url":"https://github.com/Cormac-Williams","followers_url":"https://api.github.com/users/Cormac-Williams/followers","following_url":"https://api.github.com/users/Cormac-Williams/following{/other_user}","gists_url":"https://api.github.com/users/Cormac-Williams/gists{/gist_id}","starred_url":"https://api.github.com/users/Cormac-Williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cormac-Williams/subscriptions","organizations_url":"https://api.github.com/users/Cormac-Williams/orgs","repos_url":"https://api.github.com/users/Cormac-Williams/repos","events_url":"https://api.github.com/users/Cormac-Williams/events{/privacy}","received_events_url":"https://api.github.com/users/Cormac-Williams/received_events","type":"User","site_admin":false},"repo":{"id":72771901,"name":"Eve","full_name":"Cormac-Williams/Eve","owner":{"login":"Cormac-Williams","id":19359899,"avatar_url":"https://avatars.githubusercontent.com/u/19359899?v=3","gravatar_id":"","url":"https://api.github.com/users/Cormac-Williams","html_url":"https://github.com/Cormac-Williams","followers_url":"https://api.github.com/users/Cormac-Williams/followers","following_url":"https://api.github.com/users/Cormac-Williams/following{/other_user}","gists_url":"https://api.github.com/users/Cormac-Williams/gists{/gist_id}","starred_url":"https://api.github.com/users/Cormac-Williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cormac-Williams/subscriptions","organizations_url":"https://api.github.com/users/Cormac-Williams/orgs","repos_url":"https://api.github.com/users/Cormac-Williams/repos","events_url":"https://api.github.com/users/Cormac-Williams/events{/privacy}","received_events_url":"https://api.github.com/users/Cormac-Williams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Cormac-Williams/Eve","description":"Better tools for thought","fork":true,"url":"https://api.github.com/repos/Cormac-Williams/Eve","forks_url":"https://api.github.com/repos/Cormac-Williams/Eve/forks","keys_url":"https://api.github.com/repos/Cormac-Williams/Eve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cormac-Williams/Eve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cormac-Williams/Eve/teams","hooks_url":"https://api.github.com/repos/Cormac-Williams/Eve/hooks","issue_events_url":"https://api.github.com/repos/Cormac-Williams/Eve/issues/events{/number}","events_url":"https://api.github.com/repos/Cormac-Williams/Eve/events","assignees_url":"https://api.github.com/repos/Cormac-Williams/Eve/assignees{/user}","branches_url":"https://api.github.com/repos/Cormac-Williams/Eve/branches{/branch}","tags_url":"https://api.github.com/repos/Cormac-Williams/Eve/tags","blobs_url":"https://api.github.com/repos/Cormac-Williams/Eve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cormac-Williams/Eve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cormac-Williams/Eve/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cormac-Williams/Eve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cormac-Williams/Eve/statuses/{sha}","languages_url":"https://api.github.com/repos/Cormac-Williams/Eve/languages","stargazers_url":"https://api.github.com/repos/Cormac-Williams/Eve/stargazers","contributors_url":"https://api.github.com/repos/Cormac-Williams/Eve/contributors","subscribers_url":"https://api.github.com/repos/Cormac-Williams/Eve/subscribers","subscription_url":"https://api.github.com/repos/Cormac-Williams/Eve/subscription","commits_url":"https://api.github.com/repos/Cormac-Williams/Eve/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cormac-Williams/Eve/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cormac-Williams/Eve/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cormac-Williams/Eve/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cormac-Williams/Eve/contents/{+path}","compare_url":"https://api.github.com/repos/Cormac-Williams/Eve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cormac-Williams/Eve/merges","archive_url":"https://api.github.com/repos/Cormac-Williams/Eve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cormac-Williams/Eve/downloads","issues_url":"https://api.github.com/repos/Cormac-Williams/Eve/issues{/number}","pulls_url":"https://api.github.com/repos/Cormac-Williams/Eve/pulls{/number}","milestones_url":"https://api.github.com/repos/Cormac-Williams/Eve/milestones{/number}","notifications_url":"https://api.github.com/repos/Cormac-Williams/Eve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cormac-Williams/Eve/labels{/name}","releases_url":"https://api.github.com/repos/Cormac-Williams/Eve/releases{/id}","deployments_url":"https://api.github.com/repos/Cormac-Williams/Eve/deployments","created_at":"2016-11-03T17:52:56Z","updated_at":"2016-11-03T17:52:58Z","pushed_at":"2016-11-10T16:38:50Z","git_url":"git://github.com/Cormac-Williams/Eve.git","ssh_url":"git@github.com:Cormac-Williams/Eve.git","clone_url":"https://github.com/Cormac-Williams/Eve.git","svn_url":"https://github.com/Cormac-Williams/Eve","homepage":"http://witheve.com","size":10027,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"witheve:master","ref":"master","sha":"7a212a5208ff423a2268e1a0ccfa2457c158fccb","user":{"login":"witheve","id":8482359,"avatar_url":"https://avatars.githubusercontent.com/u/8482359?v=3","gravatar_id":"","url":"https://api.github.com/users/witheve","html_url":"https://github.com/witheve","followers_url":"https://api.github.com/users/witheve/followers","following_url":"https://api.github.com/users/witheve/following{/other_user}","gists_url":"https://api.github.com/users/witheve/gists{/gist_id}","starred_url":"https://api.github.com/users/witheve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witheve/subscriptions","organizations_url":"https://api.github.com/users/witheve/orgs","repos_url":"https://api.github.com/users/witheve/repos","events_url":"https://api.github.com/users/witheve/events{/privacy}","received_events_url":"https://api.github.com/users/witheve/received_events","type":"Organization","site_admin":false},"repo":{"id":12719776,"name":"Eve","full_name":"witheve/Eve","owner":{"login":"witheve","id":8482359,"avatar_url":"https://avatars.githubusercontent.com/u/8482359?v=3","gravatar_id":"","url":"https://api.github.com/users/witheve","html_url":"https://github.com/witheve","followers_url":"https://api.github.com/users/witheve/followers","following_url":"https://api.github.com/users/witheve/following{/other_user}","gists_url":"https://api.github.com/users/witheve/gists{/gist_id}","starred_url":"https://api.github.com/users/witheve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witheve/subscriptions","organizations_url":"https://api.github.com/users/witheve/orgs","repos_url":"https://api.github.com/users/witheve/repos","events_url":"https://api.github.com/users/witheve/events{/privacy}","received_events_url":"https://api.github.com/users/witheve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/witheve/Eve","description":"Better tools for thought","fork":false,"url":"https://api.github.com/repos/witheve/Eve","forks_url":"https://api.github.com/repos/witheve/Eve/forks","keys_url":"https://api.github.com/repos/witheve/Eve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/witheve/Eve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/witheve/Eve/teams","hooks_url":"https://api.github.com/repos/witheve/Eve/hooks","issue_events_url":"https://api.github.com/repos/witheve/Eve/issues/events{/number}","events_url":"https://api.github.com/repos/witheve/Eve/events","assignees_url":"https://api.github.com/repos/witheve/Eve/assignees{/user}","branches_url":"https://api.github.com/repos/witheve/Eve/branches{/branch}","tags_url":"https://api.github.com/repos/witheve/Eve/tags","blobs_url":"https://api.github.com/repos/witheve/Eve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/witheve/Eve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/witheve/Eve/git/refs{/sha}","trees_url":"https://api.github.com/repos/witheve/Eve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/witheve/Eve/statuses/{sha}","languages_url":"https://api.github.com/repos/witheve/Eve/languages","stargazers_url":"https://api.github.com/repos/witheve/Eve/stargazers","contributors_url":"https://api.github.com/repos/witheve/Eve/contributors","subscribers_url":"https://api.github.com/repos/witheve/Eve/subscribers","subscription_url":"https://api.github.com/repos/witheve/Eve/subscription","commits_url":"https://api.github.com/repos/witheve/Eve/commits{/sha}","git_commits_url":"https://api.github.com/repos/witheve/Eve/git/commits{/sha}","comments_url":"https://api.github.com/repos/witheve/Eve/comments{/number}","issue_comment_url":"https://api.github.com/repos/witheve/Eve/issues/comments{/number}","contents_url":"https://api.github.com/repos/witheve/Eve/contents/{+path}","compare_url":"https://api.github.com/repos/witheve/Eve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/witheve/Eve/merges","archive_url":"https://api.github.com/repos/witheve/Eve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/witheve/Eve/downloads","issues_url":"https://api.github.com/repos/witheve/Eve/issues{/number}","pulls_url":"https://api.github.com/repos/witheve/Eve/pulls{/number}","milestones_url":"https://api.github.com/repos/witheve/Eve/milestones{/number}","notifications_url":"https://api.github.com/repos/witheve/Eve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/witheve/Eve/labels{/name}","releases_url":"https://api.github.com/repos/witheve/Eve/releases{/id}","deployments_url":"https://api.github.com/repos/witheve/Eve/deployments","created_at":"2013-09-10T03:52:06Z","updated_at":"2016-11-10T16:30:45Z","pushed_at":"2016-11-10T16:42:51Z","git_url":"git://github.com/witheve/Eve.git","ssh_url":"git@github.com:witheve/Eve.git","clone_url":"https://github.com/witheve/Eve.git","svn_url":"https://github.com/witheve/Eve","homepage":"http://witheve.com","size":65435,"stargazers_count":5286,"watchers_count":5286,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":43,"forks":189,"open_issues":43,"watchers":5286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/witheve/Eve/pulls/535"},"html":{"href":"https://github.com/witheve/Eve/pull/535"},"issue":{"href":"https://api.github.com/repos/witheve/Eve/issues/535"},"comments":{"href":"https://api.github.com/repos/witheve/Eve/issues/535/comments"},"review_comments":{"href":"https://api.github.com/repos/witheve/Eve/pulls/535/comments"},"review_comment":{"href":"https://api.github.com/repos/witheve/Eve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/witheve/Eve/pulls/535/commits"},"statuses":{"href":"https://api.github.com/repos/witheve/Eve/statuses/db486fc744f1a9e114251fac50ff3894443c09cc"}}}}
{"actor":{"display_login":"olafleur"}}