I've been doing some things lately that have involved converting between ...
1) Integer: screen coordinates in pixels - the desktop or image operations
2) Float: screen coordinates in OpenGL
As I was doing this, I got figuratively slapped in the face with a fish. I quickly solve the issue, but was funny.
Here goes:
Question: What is center of integer range 25 to 225 when converted to float?
Answer: It isn't 125. Its 125.5
An integer is a discrete number. If you have an integer range from 25 to 225, all of 225 including 225.3 and 225.75 fall into that range. Therefore the size of that range is 201 in integer terms, but 200 in floating point terms.
But floats are continuous and a floating point range of 25 to 225 does not include 225.000001.