'How to use an exponential easing function while using Transform.RotateAround?

I have a scene where a cube-shaped object "rolls" on a flat surface. Each time, it completes a 90-degree rotation around pivotPoint (the edge making contact with the surface) over the pivotAxis (perpendicular to the direction of movement). For this, the Transform.RotateAround function seemed appropriate, as it allows me to supply those parameters and apply the necessary position change that comes with this kind of off-center rotation. The movement has a time constraint of totalDuration.

This is inside the coroutine where movement is applied:

timePassed = 0f;
while (timePassed < totalDuration)
        {
            timePassed += Time.deltaTime;
            rotationAmount = (Time.deltaTime / totalDuration) * 90f;
            cube.RotateAround(pivotPoint, pivotAxis, rotationAmount);

            // Track rotation progress in case the function is interrupted
            offBalanceDegrees += rotationAmount;

            yield return null;
        }
// snap position and rotation of cube to final value, then repeat

This works well enough and gives me linear movement, as the rotationAmount in each iteratio is the same. However, I'd like this to feature an easing function to start off slowly and finish quickly. I must still be able to specify a pivotPoint, pivotAxis and totalDuration, and I'm a bit stuck as to how I could accomplish this.

Other examples I've seen applied rotation around the object's centre, which is a simpler case than what I have.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source