Given vertices of rectangle and triangle, I can't find or figure out an algorithm that would check if a rectangle (2D, x-y axis aligned, not rotated) is inside a triangle (2D).
The only way I see it is to check if all rectangle points are inside the triangle, but I need the algorithm to be as fast as possible, so maybe there is a faster way to do this.