Brad Hile wrote:
Just wondering if anyone has a better way to work out percentage values.
...
I've tried
set the floatprecision=2
eq=PercentAddition)/100
but it always returns 0.00
To avoid getting an integer result you need to introduce a non-integer.
You could use:
Carl West wrote:
To avoid getting an integer result you need to introduce a non-integer.
You could use:
eq=PercentAddition/100.0
eq=PercentAddition/float(100)
eq=float(PercentAddition)/100
But this won't work because the result is already an integer
before you take the 'float' of it: