mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
This allows better compensation for floating point errors introduced by the subtraction of the 1.62 height offset. For example, if the player is at y=7 exactly, their Y coordinate will be reported as 8.62, which, because of floating point errors, will be something like `8.619999999`. Subtracting `1.62` from this (really something like `1.62000000000005...`) leads to the calculated Y coordinate being slightly below 7. Rounding after subtracting this offset allows this to be rounded to 7 sharp. Similar errors appear in various other coordinates.