Direction rules of orb movement

The direction rules of orb movement determine the movement of an orb when it is attracted or repelled, including after it is released.

Attraction
When an orb is being attracted for a particular tick, a sequence of two "movements" from the orb's current position to a new position, and then from that position to another, is generated based on the position of the orb relative to the player. The relative position consists of a ratio: the horizontal component divided by the vertical component. The rules for generating a sequence are as follows:

However, when an orb is "held", or attracted for another tick, the second movement of the sequence is not executed. Rather, a new sequence is generated based on the orb's new position as a result of the first movement. The entire two-movement sequence is only executed after an orb is released.