From f60534b37431068775b0913687a5be11159cd180 Mon Sep 17 00:00:00 2001 From: Jason Le Long Date: Sat, 24 Mar 2018 22:21:17 +0000 Subject: Adding Calculation.py --- sassbot/modules/artifact2-0/Calculate.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sassbot/modules/artifact2-0/Calculate.py diff --git a/sassbot/modules/artifact2-0/Calculate.py b/sassbot/modules/artifact2-0/Calculate.py new file mode 100644 index 0000000..251a193 --- /dev/null +++ b/sassbot/modules/artifact2-0/Calculate.py @@ -0,0 +1,8 @@ +# Embedded file name: /home/bouncer/sassbot/modules/artifact2-0/Calculate.py +import math + +def DiminishingReturns(score, scale, reduction): + if score < 0: + return -diminishing_returns(-score, scale) + DiminishedReturn = int(math.ceil(math.sqrt(4 * (1 * score) / scale / 2) * scale)) - reduction + return DiminishedReturn \ No newline at end of file -- cgit v1.2.3