]> git.evergreen-ils.org Git - Evergreen.git/commit
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:28:01 +0000 (11:28 -0400)
commita072c700e72815373c6f11b14c170532c83f5f35
treeb1f74d8a8b8bb2687f37293055ab0f043354d7ba
parent7001d89f8528783fadfa948801c0d1db3be0a65a
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