In a right triangle with legs 7 and 24, what is the cosine of the angle opposite the leg of length 7?