aboutsummaryrefslogtreecommitdiff
path: root/test/cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-05-24 14:56:27 +0200
committerKristian Evers <kristianevers@gmail.com>2018-05-24 15:04:36 +0200
commit8795737e29efe59526565d757bc560d9d19163cb (patch)
tree65462b902c4054581bebdd2c7ff8b693e47e565e /test/cpp
parent6db260ff7857fcec63e5988ed43ecebc358a811d (diff)
downloadPROJ-8795737e29efe59526565d757bc560d9d19163cb.tar.gz
PROJ-8795737e29efe59526565d757bc560d9d19163cb.zip
Handle double to int typecasts in ISEA better
Originally the code was doing double to int conversions like y = (int)(x + 0.5) which results in rounding when typecasting. In an earlier attempt to avoid buffer overflows in integer typecasts this was changed to y = lround(x + 0.5) which doesn't give the origial results. We fix that here by instead doing y = lround(x) It is safe to so as long as x is positive.
Diffstat (limited to 'test/cpp')
0 files changed, 0 insertions, 0 deletions