diff options
| author | Will Hawkins <[email protected]> | 2021-12-13 21:44:50 -0500 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2021-12-13 21:44:50 -0500 |
| commit | 4c9a70fe1c7e7596eebaf475cf78596eee614c7e (patch) | |
| tree | d3f5c396f0e0daaab1b24b6238bf0730692e0b75 /utilities/utilities.go | |
| parent | 339a162877a78641a45338983de2192353fe7a5a (diff) | |
Intermediate check-in commit. Adding functionality and refactoring.
Diffstat (limited to 'utilities/utilities.go')
| -rw-r--r-- | utilities/utilities.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utilities/utilities.go b/utilities/utilities.go new file mode 100644 index 0000000..a372141 --- /dev/null +++ b/utilities/utilities.go @@ -0,0 +1,5 @@ +package utilities + +func PercentDifference(current float64, previous float64) (difference float64) { + return ((current - previous) / (float64(current+previous) / 2.0)) * float64(100) +} |
