diff options
| author | Will Hawkins <[email protected]> | 2022-05-12 15:43:41 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2022-05-12 15:43:41 -0400 |
| commit | e6cd1fedf2522e58a38a51eaa676f59094da8249 (patch) | |
| tree | 93161c113bfad7f20237a6fa1ebe564a70a1cac0 /utilities/utilities.go | |
| parent | fdfe96b53ef8f4532e5b6f65f86ba39fe242cc5b (diff) | |
[Functionality] Change definition of percent change
Switch from calculating "difference" as percent difference to calculating
the difference as percent change.
Diffstat (limited to 'utilities/utilities.go')
| -rw-r--r-- | utilities/utilities.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utilities/utilities.go b/utilities/utilities.go index b1b180f..4b114ba 100644 --- a/utilities/utilities.go +++ b/utilities/utilities.go @@ -32,7 +32,10 @@ func SignedPercentDifference( current float64, previous float64, ) (difference float64) { - return ((current - previous) / (float64(current+previous) / 2.0)) * float64( + //return ((current - previous) / (float64(current+previous) / 2.0)) * float64( + //100, + // ) + return ((current - previous) / previous) * float64( 100, ) } |
