How to determine if a point is in a 2D triangle?
In general, the simplest (and quite optimal) algorithm is checking on which side of the half-plane created by the edges the point is. Here’s some high quality info in this topic on GameDev, including performance issues. And here’s some code to get you started: