From ea9ec51d1817f4d7477cc855487d0747e70c0ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Thu, 19 Dec 2024 23:36:50 +0100 Subject: [PATCH] fix(compare): logic was wrong We did $old - $new instead of $new - $old so positive changes where good and negative where bad T-T --- compare.jq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compare.jq b/compare.jq index f663eb6..326b4de 100644 --- a/compare.jq +++ b/compare.jq @@ -1,8 +1,8 @@ -# Calculate the change in percentage of a nummeric key +# Calculate the change in percentage of a numeric key # # Where .[0] is the new value, and .[1] is the old value def calc_change($key): - . as $input | $input[1][$key] - $input[0][$key]; + . as $input | $input[0][$key] - $input[1][$key]; # Calculate the change in percentage for multiple keys #