3 ms·
He was right. If the first fencepost is centered at x=0 and the second at x=1, and you want to give the rail in-between some identifier that corresponds to its
by TOGoS 2y ago
He was right. If the first fencepost is centered at x=0 and the second at x=1, and you want to give the rail in-between some identifier that corresponds to its position (as opposed to giviung it a UUID or calling it "Sam" or something), 0.5 makes perfect sense.
In computer programming we often only need the position of the gap to the left, though, so calling it "the rail that starts at x=0" works. Calling it "the rail that ends at x=1" is alright, I guess, if that's what you really want, but leads to more minus ones when you have to sum collections of things.
- edbaskerville 2y agoI can't find a reference, but I have a vague memory that in original Mac OS X, 1-pixel-width lines drawn at integer locations would be blurred by antialiasing because they were "between" pixels, but lines drawn at e.g. x = 35.5 were sharp, single-pixel lines. Can anyone confirm/refute this?
- TOGoS 2y agoNot sure about old Mac OS, but I think HTML canvas works that way.