Search code examples
javaconvex-hull

how can I check that a point is in a triangle?


Hi also consider that I have 4 points and I will have 4 triangles how can I check these four triangles for each point that is the point within the triangles or not. thanks


Solution

  • Polygon implements the Shape interface, which provides several contains() methods. Here's a simple example.