Y
Hacker News
new
|
ask
|
show
|
jobs
by
yarg
1145 days ago
My bad, but still worth mentioning the generalised case:
int mask = -(arr[step+begin] < value); int value = (val0 & mask)|(val1 & ~mask);