Skip to content

Commit

Permalink
fixed issue ismaelJimenez#3
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbonner committed Dec 3, 2021
1 parent f06789d commit f71efa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/finance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class Finance {
static num npv(
{@required required num rate, @required required List<num> values}) {
return List<int>.generate(values.length, (int index) => index)
.map((int index) => values[index] / pow(1 + rate, index))
.map((int index) => values[index] / pow(1 + rate, index + 1))
.fold(0, (num p, num c) => p + c);
}

Expand Down

0 comments on commit f71efa8

Please sign in to comment.