determine whether one point is inside the triangle