LP#1704819 Fine generator avoids int() rounding
authorBill Erickson <berickxx@gmail.com>
Thu, 3 Aug 2017 19:01:34 +0000 (15:01 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 23 May 2019 15:25:34 +0000 (11:25 -0400)
commit297fedb2e611e2aa00d9d550712f794bd20ba16c
tree10a6d83c56504f7dd9ffabcabed0182d8cbcb620
parent3c4bf972f37f9bcf5e657873e48bfa49afa5a10d
LP#1704819 Fine generator avoids int() rounding

Avoid using the Perl int() function for rounding in the fine generator,
since it can have unexpected outcomes.

For example:

$ perl -e 'print "230 = " . int(100 * 2.30) . "\n"'
230 = 229

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm