bool grapic::isInTriangle | ( | float | px, |
float | py, | ||
float | ax, | ||
float | ay, | ||
float | bx, | ||
float | by, | ||
float | cx, | ||
float | cy | ||
) |
Decide if a point (px, py) is inside the triangle (ax, ay), (bx, by), (cx, xy). (Code provided by Bastien DOIGNIES, many thanks)