# grab value between numbers from percentage

Oey, it’s been a while since I last passed the forums.

Been in a bit of a stump as of lately, and for the life of me this is kicking my keester.

The goal is to find find the value between two numbers by using a passed percentage.

Lets say out numbers are 1 and 2:

The highest we can go is 2, and the lowest 1.

passing a percentage of .5 would yield 1.5.

It seems like every time I edit my formula… it allways runs back to (current/ total)*100
which is just regular percentage math.

Bleh! *flails arms

There is something missing… So simple, but eludes me.

Wouldn’t that just be:
( (largest - smallest) * (percentage/100) ) + smallest

So:
( (2 - 1) * (50/100) ) + 1 = 1.5

Yup, that is the stuff right there! The attempt I had previously was a bad hack, changing the decimal place of the percentage…yadda yadda… this is nice and cleaner! I’m learning pythons slowly and am working on something comparable to tweenmachine. Not sure if it will ever be finished, a nice pet project none the less. Thank you for your help!