Does unity have a way to calculating the following?
\sqrt[5]{x}
Essentially, I like the scaling of…
Damage Reduction = 10*\sqrt[5]{Armor}
I have a value for armor and trying to find the value of damage reduction so I can’t “to the power of” for the unknown value.
To be clear this is not 5*square root or the square root of 5. I want to essentially uncube a number (but 5 instead of 3).
Hello AKoebnick,
I’m not sure to understand your expression, does it represent the fifth root of x? (It’s a number that when multiplied by itself five times equals x)
In that case it would simply be Mathf.Pow(x, 1f / 5f);
For example the fifth root of 32 would be 2 because 2x2x2x2x2 = 32
You can try WolframAlpha and tell me if it’s what you are looking for:
Yes that is what I was looking for. I figured Mathf.Sqrt was more what I was going for. I was not aware you could use Mathf.Pow like that.