Motivation:
This Wolfram webpage suggests that you can represent a floor function analytically as:
$$\left \lfloor x \right \rfloor := x + \frac{\tan^{-1}(\ \cot(\pi x) \ )}{\pi} - \frac{1}{2} \ \\ \forall x ∈ ℝ \backslash ℤ $$
which is valid whenever x is not an integer.
Yes, it works (and I'm amazed).
However, I'd like to safely use the function even when x is an integer, hence the question. It's not hard per-se, my brain just doesn't like me right now.
I appreciate any guidance you have to offer.
A simple solution to the problem stated in the question title, rather than in the paragraph below, is $$ y = \frac{x + \lfloor x+1 \rfloor}{2}. $$
Mees de Vries's comment explains nicely why you're not likely to find a "pretty" answer in terms of known continuous functions.