20.09.2011, 23:45
i guess its the script using a variable or a precompiled number.
test 1...
... assigns 5 to var, and...
... calculates 1 as integer into var; its truncated if you divide any integer by an odd number. 3/2=0, 5/5=1
test 2...
... writes a precompiled number into var: (5*(1/5=0)) equals var=0;
test 3...
... writes the also precompiled, but this time a float i assume, as integer, into var. var=1.0000, as integer = 1?
test 2 proves thats its doing nothing but writing a cell into the vairable, while test1 and test3 are using the prior defined var.
repeat that test with public functions, using the Profiler Plugin ^^
test 1...
Код:
var = (var / 5);
... calculates 1 as integer into var; its truncated if you divide any integer by an odd number. 3/2=0, 5/5=1
test 2...
Код:
var = (5 * ((1)/(5)));
test 3...
Код:
var = (5 * 0.2);
test 2 proves thats its doing nothing but writing a cell into the vairable, while test1 and test3 are using the prior defined var.
repeat that test with public functions, using the Profiler Plugin ^^