Maybe extract the `0.5f` into a constant called `FLOAT_FUDGE` or something like that, with a comment explaining why this helps?  Same thing for the `- 2` below?