I have a game (C++) in which I want to transition between two speeds of motion. For illustration, the player raises their weapon to aim, and whilst this is in progress over a known duration, time should slow down incrementally until it reaches the target rate.
Slowing it down linearly is easy. We have a start speed (e.g. 1.0), an end speed (e.g. 0.2), and can determine where we are in the fixed-length transition (e.g. 2000ms)
However if I slow it down linearly, the look and feel is just wrong. I suspect that to feel 'right', it should slow down quickly early in the transition, and then at a decreasing rate towards the end.
My maths is less than brilliant; it's been a long time since I graphed a function, and I rarely if ever introduce this kind of stuff into code. At a guess, using part of a 1/x or x^2 curve might give me what I want, but I'd still have to parametrise it to suit.
This or something like it must be a regularly-solved problem, so what's the simplest approach I can use here?