I need to compute the steps between a start and end in a range for the purpose of sizing fonts.
Given:
Start Value: 14.0,
End Value: 250.0,
Steps: 28
Resulting Values: 14.0, 15.5, 17.1, 18.9, ... 204.9, 226.3, 250.0
I calculated each value by adding 10.45% to the previous value (based on trial and error), but how do I calculate this percentage?
Guessing there is some compounding interest type function that could be used here.
A formula or pseudo code is fine.
Ultimately, this will be a C#.
is the basic formula you will need.
If you know the
NumberOfStepsand you want thePercentage, a bit of algebra will get you the formula (pseudocode,^is the exponent operator):If you know
Percentageand you wantNumberOfSteps, you’re better off with a loop