UPDATED: Test if point in triangle
== UPDATED: slightly quicker than original script (less nesting) ==
Just a quick demo of a script that shows how I'd go about testing if a point is within a triangle.
If you compare it with the original projects then you may well be able to see how the expressions in this script here relate to what was happening in the original projects.
(I think it's also [usually] a teensy bit quicker than those scripts, since it often gets out after testing only one or two of the cases, on average – of course, there could be situations where nearly all of the tris might end up getting to the final test of the three, in which case it might end up a bit slower...)