# How to invert a damage formula?

I have created simple damage formula based on source percent, which return fixed percent of damage.

DAMAGE_PERCENT = Exp(Log(100) * (1 - (100 - SOURCE_PERCENT) / 150)


Here is the result:

percent[0]: 4.641589
percent[1]: 4.786301
percent[2]: 4.935525
....
percent[98]: 94.04449
percent[99]: 96.97654
percent[100]: 100


How can I make it return same results but with reversed SOURCE_PERCENT value?

So percent[0] should return 100 and percent[100] return 4.641589?

float GetDamageInverse(int percent) {

Or you can change your equation to replace the 100 - SOURCE_PERCENT with SOURCE_PERCENT.