A extremely fast and simple collision method that works for axis-aligned rectangle - right triangle shapes. Doesn't work with seperate values for the triangle's width and height, yet, but I know the solution (would be done by replacing the boolean that involves rect's x with "(height/width) * rect.x"). Also it isn't optimised for triangle's X pos.
I made this in my notebook and decided to test it with Scratch, so I thought I might as well upload it, but it isn't finished, and I don't know if ever get back to it, but it's cool sooo... I may make a demo that involves collisions between points, triangles, rectangles and circles for education purposes, when I figure out circle-rectangle and circle-triangle :D