Simple Math Problem
#1

Hello guys,

I have some problem with a simple math calculation

PHP код:
new Float:price =  ((1/value)*100000);
new 
price_r floatround(pricefloatround_round) ; 
PHP код:
printf("F = %f, R = %d"priceprice_r); 
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:

PHP код:
new Float:value_f value;
new 
Float:price =  ((1/value_f)*100000);
new 
price_r floatround(pricefloatround_round) ; 
seems to work, really strange (or not :-p )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)