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?

Results 1 to 4 of 4

- January 18th 2009, 09:52 PM #1

- Joined
- Jan 2009
- Posts
- 3

- January 18th 2009, 09:57 PM #2

- Joined
- Jan 2009
- Posts
- 3

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.

- January 18th 2009, 10:00 PM #3

- Joined
- Jan 2009
- Posts
- 3

- January 18th 2009, 10:01 PM #4