/**
 * Returns a Future Worth Factor assuming a single payment.
 * @param i 100-based interest rate e.g. 15% = 15
 * @param n number of periods
 */
export function singleFW (i, n) {
  let futureWorthFactor = Math.pow((1 + (i / 100)), n)
  return futureWorthFactor
}

/**
 * Returns a Present Worth Factor assuming a single payment.
 * @param i 100-based interest rate e.g. 15% = 15
 * @param n number of periods
 */
export function singlePW (i, n) {
  let presentWorthFactor = 1 / singleFW(i, n)
  return presentWorthFactor
}

/**
 * @param i 100-based interest rate e.g. 15% = 15
 * @param n number of periods
 */

@@ -58,32 +58,41 @@
 yment.%0A * @param
+ %7BNumber%7D
  i 100-based int
@@ -117,32 +117,41 @@
 %25 = 15%0A * @param
+ %7BNumber%7D
  n number of per
@@ -147,32 +147,52 @@
 mber of periods%0A
+ * @return %7BNumber%7D%0A
  */%0Aexport funct
@@ -353,32 +353,49 @@
 a single payment
+%0A * in the future
 .%0A * @param i 10
@@ -381,32 +381,41 @@
 uture.%0A * @param
+ %7BNumber%7D
  i 100-based int
@@ -440,32 +440,41 @@
 %25 = 15%0A * @param
+ %7BNumber%7D
  n number of per
@@ -474,24 +474,44 @@
  of periods%0A
+ * @return %7BNumber%7D%0A
  */%0Aexport f

document function input and return types