Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix pctchange calculation
Browse files Browse the repository at this point in the history
Was returning the pctchange of the last value in the
list rather than the sums.
  • Loading branch information
CGemignani committed Aug 25, 2009
1 parent 84d049f commit eda5bc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flare/src/flare/query/methods/pctchange.as
Expand Up @@ -14,6 +14,6 @@ package flare.query.methods
*/
public function pctchange(newval:*, oldval:*):Arithmetic
{
return Arithmetic.Divide(Arithmetic.Subtract(newval, oldval), oldval);
return Arithmetic.Divide(Arithmetic.Subtract(sum(newval), sum(oldval)), sum(oldval));
}
}

0 comments on commit eda5bc8

Please sign in to comment.