compoundAdd static method

double compoundAdd(
  1. double principal,
  2. double rate,
  3. int times
)

Calculates compound addition (useful for financial calculations).

Implementation

static double compoundAdd(double principal, double rate, int times) {
  return principal * math.pow(1 + rate, times);
}