def smoothDamp(current, target, currentVelocity, smoothTime, maxSpeed, deltaTime):
    '''
    Based on Unity3D SmoothDamp
    See: http://answers.unity3d.com/answers/310645/view.html
    '''
    smoothTime = max(0.0001, smoothTime)

    num = 2.0 / smoothTime;
    num2 = num * deltaTime;
    num3 = 1.0 / (1.0 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2)
    num4 = target - current
    num5 = target
    num6 = maxSpeed * smoothTime
    num4 = np.clip(num4, -num6, num6)
    target = current - num4
    num7 = (currentVelocity + num * num4) * deltaTime
    currentVelocity = (currentVelocity - num * num7) * num3
    num8 = target + (num4 + num7) * num3
    for i in xrange(len(current)):
        if (num5[i] - current[i] > 0.0 == num8[i] > num5[i]):
            num8[i] = num5[i]
            currentVelocity[i] = (num8[i] - num5[i]) / deltaTime

    return num8, currentVelocity
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/cameracontrol.py/smoothDamp/swapped operands of `-`