So, I was asking myself about what functions have the property that if they are translated in the $x$ direction the result is the same as if it was translated in the $y$ direction.
So the question can be rephrased as what are all the functions $f$ that satisfy
$$f(x+b) = f(x)+b$$
for a $b$ parameter that is real.
I know that any straight line at $45^\circ$ will obey this property, since:
$$f(x)=x+c\Longrightarrow f(x+b) =x+b+c = x+c+b = f(x)+b$$
, but what are the other functions that obey it (if there are any)?
Let $g:[0,1)\to\Bbb R$ be any function whatsoever. Then the function $$f(x)=g\left(\left\{\frac{x}{b}\right\}\right)+b\left\lfloor\frac{x}{b}\right\rfloor$$ satisfies your equation (where we are taking the fractional and integral parts of $\dfrac{x}{b}$).
This is because $\left\{\dfrac{x+b}{b}\right\}$ is the same as $\left\{\dfrac{x}{b}\right\}$, and $\left\lfloor\dfrac{x+b}{b}\right\rfloor=\left\lfloor\dfrac{x}{b}\right\rfloor+1$. Essentially we are stretching the graph of $g$ by a factor of $b$ in the $x-$ and $y-$ directions, and duplicating it out to plus and minus infinity along a $45^\circ$ axis.