Re:How do you compute the midpoint of an interval? (2014) [pdf]
by Sean1708 on Friday March 29, 2019 @10:14AM
(#19521846)
Since you're casting to unsigned int anyway, can't you just use / 2?
[ Parent
| on HN ]
Re:How do you compute the midpoint of an interval? (2014) [pdf]
by kevinventullo on Friday March 29, 2019 @10:46AM
(#19522125)
Yeah, I believe those compile to the same thing for unsigned ints. You can confirm using godbolt.