The calculation of rainbow scattering cross sections