trail-formation: Add comments to calcDirection