Comment Comment by mredigonda You can also do x + (y - x) / 2 (starting point + distance halved), that doesn't overflow, is easy to remember, and the compiler would probably optimize it further. parent mredigonda 3 years ago