How would I translate an ease in out function from c++ to python?
<p>I have been attempting to translate a function from C++ to Python for a while but I cannot understand the function well enough to translate it on my own.</p>

<pre><code>//C++
float Cubic::easeInOut(float t,float b , float c, float d) {
    if ((t/=d/2) &lt; 1) return c/2*t*t*t + b;
    return c/2*((t-=2)*t*t + 2) + b;    
}

//Python
def rotate(t, b, c, d):
    t = t/(d/2)
    if (t &lt; 1):
        return c/2*t*t*t + b
    t = t-2
    return c/2*((t)*t*t + 2) + b
</code></pre>

<p>Edit: this is what i got so far but it doesn't return a list that rises from 0.0 to 1.0.
Has anyone ever done this in python before?</p>
