#NEWLINE# def _point_in_triangle( p , a , b , c ) : #NEWLINE# #INDENT# whole = abs ( calc_area ( [ a , b , c ] ) ) #NEWLINE# parta = abs ( calc_area ( [ a , b , p ] ) ) #NEWLINE# partb = abs ( calc_area ( [ b , c , p ] ) ) #NEWLINE# partc = abs ( calc_area ( [ c , a , p ] ) ) #NEWLINE# thresh = 1e-07 #NEWLINE# return ( ( ( parta + partb ) + partc ) < ( whole + thresh ) )