This commit is contained in:
Miloslav Ciz 2024-08-31 14:44:45 +02:00
parent 124b9d1e7c
commit 3f374a4713
85 changed files with 2281 additions and 2272 deletions

View file

@ -71,12 +71,12 @@ int pointIsInTriangle(int px, int py, int tp[6])
int w2 = (tp[i1 + 1] - py) * (tp[i2] - tp[i1]) - (tp[i1] - px) * (tp[i2 + 1] - tp[i1 + 1]);
int sign2 = w2 > 0 ? 1 : (w2 < 0 ? -1 : 0);
if (sign * sign2 == -1) // includes edges
//if (sign != sign2) // excludes edges
return 0;
}
return 1;
}
```
```