Fixed #119 -- Explicitly set decimal rounding mode

This commit is contained in:
Raphael Michel
2016-02-11 17:27:11 +01:00
parent 417539d101
commit 0741c00133
4 changed files with 13 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
from decimal import ROUND_HALF_UP, Decimal
def round_decimal(dec):
return Decimal(dec).quantize(Decimal('0.01'), ROUND_HALF_UP)