# Function G2lib::isPointInTriangle

- Defined in File G2lib.cc

## Function Documentation

int_type G2lib::isPointInTriangle(real_type const *pt, real_type const *P1, real_type const *P2, real_type const *P3)

  Check if a point is inside a triangle

  Parameters

    - pt – [in] point to check if is inside the triangle

    - P1 – [in] first point of the triangle

    - P2 – [in] second point of the triangle

    - P3 – [in] third point of the triangle

  Returns

    {0,+1,-1} return +1 = Inside return -1 = Outsize return 0 = on border