22.02.2013, 19:41
Hello guys,
I have some problem with a simple math calculation
This shows "F = 0.00000, R = 0"
Whats wrong with my code ?
edit: value shows 700 if a do a printf, so it's not the problem (but it's not a float, i don't know if it matters)
edit2:
seems to work, really strange (or not :-p )
I have some problem with a simple math calculation
PHP код:
new Float:price = ((1/value)*100000);
new price_r = floatround(price, floatround_round) ;
PHP код:
printf("F = %f, R = %d", price, price_r);
Whats wrong with my code ?
edit: value shows 700 if a do a printf, so it's not the problem (but it's not a float, i don't know if it matters)
edit2:
PHP код:
new Float:value_f = value;
new Float:price = ((1/value_f)*100000);
new price_r = floatround(price, floatround_round) ;