Recoil-distance measurements of g-factors for 24Mg(21+) and 20Ne(21+)