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?
The java.awt.Polygon class has a number of contains(...) methods if you use Polygon objects to represent your polygon.
java.awt.Polygon
contains(...)