I have a convex polygon (typically just a rotated square), and I know all of 4 points. How do I determine if a given point (yellow/green) is inside the polygon?
Check to see if it's on the same side of the 4 half-planes defined by the lines that contain the line segments that make up the sides of the quad.
Here is a good explanation.