Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Commit

Permalink
Fix historicalSlope computation
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegueul committed Nov 12, 2019
1 parent 341e4fd commit ebc556a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ data MetricException

real historicalSlope(rel[datetime day, num amount] history, int monthsAgo) {
if (history == {}) {
throw undefined("No history available for slope computation.", |unknown:///|);
return 0.0;
}

sorted = sort(history, bool(tuple[datetime, num] a, tuple[datetime, num] b) { return a[0] < b[0]; });
Expand Down

0 comments on commit ebc556a

Please sign in to comment.