Calculating Line Intersections without looping

I’ve got a game I’m working on that’s tile based. I have a bunch of tiles on the map and a line and I’m trying to figure out how to determine what tiles the line is passing through without looping through all tiles or all of the points on the line. I’m sure there’s a way to do with just using math - but I haven’t figured it out.

I know the starting point of the line and the ending point of the line so I also know the slope, and I know the size of each tile. The tiles are stored in a 2D array that corresponds with their x/y position in the map.

Does anybody have any suggestions on how I might figure this out using math?