Could someone please explain me how it works?

Manual says

[Quote]unlerp(a, b, y) Reverse linear interpolation: if lerp(a, b, x) = y, then unlerp(a, b, y) = x. Calculates (y - a) / (b - a).[/QUOTE]

but to be fair i don't get it.

7 posts
• Page **1** of **1**

One possible use of unlerp is to do scrollbar math.

http://dl.dropbox.com/u/5426011/examples13/unlerp_scroll.capx

http://dl.dropbox.com/u/5426011/examples13/unlerp_scroll.capx

**Posts:**4,663**Reputation:**37,191

B

75
S

21
G

48
In layman's terms, it gives you the percentage of point between two values.

You have points A and B and you want to know where your "x" between points is in relation to those points. So you do unlerp(A,B,x) to see where the x is standing relative to the range between A and B.

You have points A and B and you want to know where your "x" between points is in relation to those points. So you do unlerp(A,B,x) to see where the x is standing relative to the range between A and B.

**Posts:**1,910**Reputation:**13,155

B

62
S

21
G

12
**Posts:**19**Reputation:**3,081

B

13
S

3
G

4
7 posts
• Page **1** of **1**

## Who is online |

Users browsing this forum: Cipriux, eleanorawesome and 8 guests |