On Mon, Jun 30, 2014 at 02:27:18PM +0200, Hans de Goede wrote:
> Once we get beyond the:
>
> if (abs(diff) <= margin)
> return center;
>
> test, then diff is either > margin or < -margin, otherwise the test would
> have triggered.
>
> So the "return center + diff;" at the end
Once we get beyond the:
if (abs(diff) <= margin)
return center;
test, then diff is either > margin or < -margin, otherwise the test would
have triggered.
So the "return center + diff;" at the end will never be reached, and the
"else if (diff < -margin)" can be turned into