View Single Post
  #6 (permalink)  
Old 04-17-2008, 07:58 AM
puter puter is offline
Newbie
 
Join Date: Apr 2008
Posts: 5
Rep Power: 0
puter is on a distinguished road
Default Re: Strange rounding

Quote:
Originally Posted by justto_doit View Post
its funny~
I have do something similar but I cannot get this error

e.g.
double distance;
double speedConv;
for (speedConv = 0; speedConv < 30; speedConv++)
{
distance = speedConv / 3600;
Debug.WriteLine(distance);
}

or may you point out where is the difference between us?
only difference is that yours is counting up in order.

Right now I'm generating random data to test my code, so they are never the same number.

That should not affect the test.

What error are you getting? I don't get an error, I just get a distance of 0.
Reply With Quote