I want a monotonic function on the positive real numbers that behaves like floor but in smooth way, like smoothstep but for all integers. It should follow this simple rule.
slope is zero at integers and slope is maximum at median of two adjacent integers or in other words: slope is at $0$ when fract$(x) = 0$ and slope is at maximum when fract$(x)=0.5$
So far i was able to approximate this function my self with help of trigonometric functions. $$ f(x) = \lfloor x \rfloor + \max\left(\frac{(-1)^{\lfloor x\rfloor}}{2}(1-\cos(\pi x)), \frac{(-1)^{\lfloor x+1\rfloor}}{2}(1-\cos(\pi x + \pi))\right) $$ can this be achieved in a simpler/shorter way?
What do yo think of : $$y(x)=x-\frac{\sin(2\pi x)}{2\pi}$$