|
From: Daniel J S. <dan...@ie...> - 2004-03-29 21:01:32
|
Daniel J Sebald wrote:
>
>
> triangle_classification = ~ (classification[0]
> | classification[1]
> | classification[2]);
>
> if (triangle_classification >= 3) {
No, that is not exactly right. Technically it should be
if ((triangle_classification & 3) == 3) {
to be foolproof in general. However, in this case the above should work, as well as the slightly simplified:
triangle_classification = classification[0]
| classification[1]
| classification[2];
if (!triangle_classification) {
As I said, not exactly reader friendly.
Dan
|