C'mon Nik, draw a few pictures and think this through. You think a 24/12 roof would be a 90 degree angle?
Here is an exercise that should make it more clear. Make a small table of values for the tangent of an angle by measuring a drawing:
You will need a ruler and a protractor. Your angles and measurements will not need to be very precise to get the idea.
Take a piece of paper and pick a point near the lower left corner. Draw a base line across, whatever length works easily with the protractor. Draw one line up from each end of the base line, perpendicular to the base line.
Use the protractor to draw lines from the original point at several angles to the base until they cross the line on the right. Measure the length of the segment of the line on the right between the base line and the point the angled line crosses it. Divide that by the length of the base at several angles (same as roof slope) to get the tangent.
After you have made a small table of these numbers, try drawing a graph of angle vs. tangent with the x-axis 0 to 90 degrees and the tangent on the y-axis.
I suggest using angles of 0, 15, 30, 45, 60, 75 and 90. You might also want to do 22.5 since it was part of your original question.