|
Post by kokenge on Mar 4, 2009 8:09:00 GMT -5
When a value rounds to zero, I get d value of 0.0d back
print round(1.2345,1) print round(1.45,1) print round(.05,1) print round(.5,0) print round(0,1) ' this returns 0.0d wait
' --------------------------------- ' Round a value to desired decimals ' --------------------------------- FUNCTION round(val,dec) dec = max(0,dec) dec = min(20,dec) a = 10^dec val = ((val * a) + .5) / a val$ = str$(val) + ".0000000000000000000" v1$ = word$(val$,1,".") + "." + left$(word$(val$,2,"."),dec) round = val(v1$) END FUNCTION
|
|
|
Post by Carl Gundel - admin on Mar 5, 2009 15:37:39 GMT -5
Yes, thanks. This is already fixed for the next release.
-Carl
|
|