Angular dependence of the switching field of thin-film longitudinal and perpendicular magnetic recording media