I'm trying to write an algorithm that calculates a % for me based on two numbers.
117.6 = 100%
98 = 50%
So, if x falls between 117.6 and 98 it would be what % (something between 50-100%)?
Is that even possible to calculate?
Basically, it's a function to calculate decay of speed on a ball.
So, if the ball is hit at the height of 117.6 it will travel at 100% speed whereas if the ball is hit at height of 98 it will travel at 50% speed.
So, need to know what % speed the ball will travel at if it's hit at a height of 105 for instance.