Angular distributions of gamma rays with intermediate-energy beams and spectroscopy of ³²Mg