Trying to get this Javascript formula to work with UnityScript. Any help is appreciated.
A = 3700;
B = 1000;
C = Mathf.Pow((A/B), (1/3))*5.825;
It returns 5.825, which it should equal 9.009413177222106
Trying to get this Javascript formula to work with UnityScript. Any help is appreciated.
A = 3700;
B = 1000;
C = Mathf.Pow((A/B), (1/3))*5.825;
It returns 5.825, which it should equal 9.009413177222106
It’s returning the correct value. You’re using integer math, so 3700/1000 = 3 and 1/3 = 0.