Rotation alignment for measuring easy-plane magnetic anisotropy