How do units reform formations after disruption?

//ads -- adsterra.com -- native banner
?>
When you have your units, for example, in line formation marching north and you then tell them to march east, there is some shuffling about and the formation turns as a cohesive body. The question is, how exactly is this done? Do the units towards the turn slow down, or do the units opposite the turn speed up? What about reforming the formation after passing obstacles?
I am interested in any version of AoE2, though it seems we don't have tags for all of them
Pictures about "How do units reform formations after disruption?"



How do I use reforms?
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Mathias Reding, Mathias Reding, Mathias Reding, Ketut Subiyanto