3 ms·
I like this. I feel like "offset" hints at the reason for starting at 0. "How far do you have to offset your feet (from the beginning of whatever space we're
by TOGoS 2y ago
I like this. I feel like "offset" hints at the reason for starting at 0. "How far do you have to offset your feet (from the beginning of whatever space we're talking about) before you're touching the thing in question?" If it's the first thing, you don't have to move at all, so zero offset
- TOGoS 2y agoOf course you could also "offset your feet" until they're past the end of the last thing, and then you've counted the number of things. But the offset of the thing itself (as opposed to that of your feet) could be considered zero, assuming the natural position of the thing is for its left edge to be at the left edge of the space. But maybe its natural position is to be centered at x=0 and it had to be moved by 0.5 for the left edges to line up, in which case see my other comment. In any case, I think the argument over 0 or 1 or 0.5-based indexing can be resolved just by being clear about what it is you're counting.