In linear algebra you learn to rotate the plane. If you want to rotate some geometrical structure defined by its coordinates (such as the graph of a function, defined by the points $(x, f(x))$, or a figure defined by an equation, or just a list of points) counterclockwise by an angle of $\theta$, you replace $x$ by $x\cos\theta + y\sin\theta$ and you replace $y$ with $y\cos\theta - x\sin\theta$. This means that the formula for a rotated sine wave (given originally by $y = \sin(x)$) is
$$
y\cos\theta - x\sin\theta = \sin\left(x\cos\theta + y\sin\theta\right)
$$
If the axis of the rotated sine wave is closer to the $x$-axis than to the $y$-axis (for instance is $\theta$ is between $\pm 45^\circ$), then this can theoretically be rearranged to a function $y = f(x)$, but I have no idea how it would be done. Similarily, if the new axis is more aligned with the $y$-axis, the above expression can be rearranged to a function $x = f(y)$, but I still do not know how.