InverseLerp finds the **progress** between two values.
For `InverseLerp(float a, float b, float value)`, *a* is the start, *b* is the end, *value* is the current position. It returns how far along the "path" *value* is from *a* to *b*.
---
For example, you might use it in a flocking algorithm to apply falloff in your Seek behaviour: `var seek_influence = InverseLerp(min_distance, max_distance, current_distance)` Now you know how strongly you should apply your seek behaviour (0 = don't apply, 1 = maximum power!).
Trending Articles
More Pages to Explore .....