commit
message
Added some documentation.
author
Ben Vogt <[email protected]>
date
2017-01-16 21:42:54
stats
1 file(s) changed,
19 insertions(+),
0 deletions(-)
files
src/RawFormulas.ts
1diff --git a/src/RawFormulas.ts b/src/RawFormulas.ts
2index f9a645b..9c81885 100644
3--- a/src/RawFormulas.ts
4+++ b/src/RawFormulas.ts
5@@ -43,6 +43,12 @@ function valueToNumber(value: any) : number {
6 return 0;
7 }
8
9+/**
10+ * Returns the absolute value of a number.
11+ * @param value to get the absolute value of.
12+ * @returns {number} absolute value
13+ * @constructor
14+ */
15 var ABS = function (value?) {
16 checkArgumentsLength(arguments, 1);
17 value = valueToNumber(value);
18@@ -106,6 +112,12 @@ var ACCRINT = function (issue, first, settlement, rate, par, frequency, basis) {
19 return par * rate * factor;
20 };
21
22+/**
23+ * Returns the inverse cosine of a value, in radians.
24+ * @param value The value for which to calculate the inverse cosine. Must be between -1 and 1, inclusive.
25+ * @returns {number} inverse cosine of value
26+ * @constructor
27+ */
28 var ACOS = function (value?) {
29 checkArgumentsLength(arguments, 1);
30 value = valueToNumber(value);
31@@ -117,6 +129,12 @@ var ACOS = function (value?) {
32 return Math.acos(value);
33 };
34
35+/**
36+ * Returns the inverse hyperbolic cosine of a number.
37+ * @param value The value for which to calculate the inverse hyperbolic cosine. Must be greater than or equal to 1.
38+ * @returns {number} to find the inverse hyperbolic cosine for.
39+ * @constructor
40+ */
41 var ACOSH = function (value?) {
42 checkArgumentsLength(arguments, 1);
43 value = valueToNumber(value);
44@@ -125,6 +143,7 @@ var ACOSH = function (value?) {
45 }
46 return Math.log(value + Math.sqrt(value * value - 1));
47 };
48+
49 var ACOTH = Formula["ACOTH"];
50 var AND = Formula["AND"];
51 var ARABIC = Formula["ARABIC"];