This is just doing boolean logic. Sometimes there is a motivation to use bitwise
operators in place of boolean operators to optimize hot paths that are
negatively affected by the stalling semantics of boolean shortcut logic. But
this is not the case here. This is not a hot path.
x2 = e->c - e->b * y2;
}
- if (((x1 > pxmax) & (x2 > pxmax)) | ((x1 < pxmin) & (x2 < pxmin)))
+ if ((x1 > pxmax && x2 > pxmax) || (x1 < pxmin && x2 < pxmin))
return;
if (x1 > pxmax) {
x1 = pxmax;
y2 = e->c - e->a * x2;
}
- if (((y1 > pymax) & (y2 > pymax)) | ((y1 < pymin) & (y2 < pymin)))
+ if ((y1 > pymax && y2 > pymax) || (y1 < pymin && y2 < pymin))
return;
if (y1 > pymax) {
y1 = pymax;