positionfar away on the left, it is not visible, and the value of
positionis negative. Zero corresponds exactly with the left edge, the beginning visible "platform".
prevbunch of emoticons goes to the right, its
positionincreases. But the last car don't have to go to the right of the left edge of the platform. Therefore, the
position(usually negative) is equal to the greatest of the two:
0or the computed value. If the "left",
positionhas turned positive. And
Math.min(0, position)is equal to
positionshould not be to the left of == is less than the negative length of the train plus the length of the platform.