Comment Comment by dskloet It's not the same. With integer division you know the division rounds down, so using <= always splits between the two points.That said, it's always safer to compute the mean of two integers asmin + (max - min) / 2to avoid integer overflow. parent dskloet 10 years ago
That said, it's always safer to compute the mean of two integers as
min + (max - min) / 2
to avoid integer overflow.