]> 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:27:11 +0000 (11:27 -0400)
commit4a4e45f2b531f641064f480671d7a65846ab0b03
treefe00ee7f965cac6afb600aae36af022a7035ae97
parent4561e40aaadd5d1480a10329f6d3d5514c866f41
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