Do you shake or swirl formula?

I’ve been breastfeeding up until now & I know that when you warm a bottle of breast milk, you have to swirl it but the directions on the container of formula say to shake it. Which one do I do?