commit
message
Formulas.MINA written and tested.
author
Ben Vogt <[email protected]>
date
2017-01-22 16:08:47
stats
2 file(s) changed,
11 insertions(+),
0 deletions(-)
files
src/RawFormulas.ts
tests/FormulasTest.ts
1diff --git a/src/RawFormulas.ts b/src/RawFormulas.ts
2index caeb7ea..76fcf2e 100644
3--- a/src/RawFormulas.ts
4+++ b/src/RawFormulas.ts
5@@ -556,7 +556,16 @@ var MIN = function (...values) {
6 };
7
8
9-var MINA = Formula["MINA"];
10+/**
11+ * Returns the minimum numeric value in a dataset.
12+ * @param values The value(s) or range(s) to consider when calculating the minimum value.
13+ * @returns {number} the minimum value in the dataset
14+ * @constructor
15+ */
16+var MINA = function (...values) : number {
17+ return MIN.apply(this, values);
18+};
19+
20 var MOD = Formula["MOD"];
21 var TRUE = Formula["TRUE"];
22 var NOT = Formula["NOT"];
23diff --git a/tests/FormulasTest.ts b/tests/FormulasTest.ts
24index 6d5d39a..a6a4227 100644
25--- a/tests/FormulasTest.ts
26+++ b/tests/FormulasTest.ts
27@@ -460,8 +460,10 @@ catchAndAssertEquals(function() {
28 }, ERRORS.VALUE_ERROR);
29
30
31+// Test MINA
32 assertEquals(MINA(100, 22, 44), 22);
33
34+
35 assertEquals(MOD(10, 3), 1);
36
37 assertEquals(NOT(TRUE()), false);