I have a 2d game in which I need to check collisions properly. For example I need to check if one box touches another, when I have the cordinates of top left vertices of both and their side lengths.
// where side is side length
function touches(x1, y1, size1, x2, y2, size2){
...
}
I couldn't find any questions like this here, is there a way to create a function like this?