//"This can replace most of your basic linear interpolations - it's not extreme, but adds some nice smoothness to otherwise plain animation." //>>> "This is your go-to interpolation function" //From here: http://s...content-available-to-author-only...e.net/interpolation/ inline float SmoothStep(float position) { return (position * position * (3.0f - (2.0f * position))); } //"One rather handy algorithm, especially when you don't necessarily know how the target will behave in the future //(such as a camera tracking the player's character), is to apply weighted average to the value." //From here: http://s...content-available-to-author-only...e.net/interpolation/ // //The movement starts off fast, and rapidly decelerates as you approach the goal. //Technically, you never actually reach 1.0f. The higher 'slowdown' is, the slower you approach the goal. inline float WeightedAverage(float position, float slowdown = 15.0f) { return ((position * (slowdown - 1.0f)) + 1.0f) / slowdown; } //This doesn't actually effect the value at all. inline float LinearEase(float position) { return position; }