There are certain creatures with a extra ability attached to their attack if they move a certain distance towards their opponent before attacking. Take the Gorgon as an example, it has the Trampling Charge ability:
Trampling Charge. If the gorgon moves at least 20 feet straight toward a creature and then hits it with a gore attack on the same turn, that target must succeed on a DC 16 Strength saving throw or be knocked prone. If the target is prone, the gorgon can make one attack with its hooves against it as a bonus action.
When it says 20 feet straight towards an opponent, how straight does that need to be assuming you are using a square based grid for character locations? Do the last 20 feet of movement made by the creature need to be all in the same direction? Or would a movement pattern like east, southeast, east, southeast qualify as having moved 20 feet straight towards an opponent?