Calculates the translation of a function, which can be horizontally, vertically, or both.
The function
Horizontal translation (positive moves right)
Vertical translation (positive moves up)
Calculates the translation of a function, which can be horizontally, vertically, or both.