Types.pp: Fix CenterPoint procedure to work on large coordinates
Original Reporter info from Mantis: Ask
-
Reporter name: Alexander S. Klenin
Original Reporter info from Mantis: Ask
- Reporter name: Alexander S. Klenin
Description:
CenterPoint will fail if the sum of coordinates overflows Longint.
Steps to reproduce:
You can use avg_test.pp to see the difference.
This file may be converted to a unit test, if so desired.
Additional information:
Actually using Int64 may be a better way,
but int64 division is compiled into a function call (!),
so I opted for a conditional instead.
Mantis conversion info:
- Mantis ID: 13972
- Version: 2.3.1
- Fixed in version: 2.4.0
- Fixed in revision: 13274 (#79e6ed50)