|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Rounding numbers
Ohh I see. Actually, this line:
Code:
time_i = ((i * 262) / 10000); So after that line above, time_i is assigned 0 until i > 38 (i*262/10000 = i*0.0262 < 1, but since we have an integer it truncates the decimal part and gives you 0). For 38 <= i <= 76, time_i will be assigned 1 (you will have 1.***, and the decimal part will be removed). For 77 <= i <= 152, time_i = 2, and so on. |
|
#2
|
|||
|
|||
|
Re: Rounding numbers
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Negative numbers? | Calvin | Programming | 6 | 09-02-2005 10:46 |
| Part Numbers | DDRAngelKurumi | Kit & Additional Hardware | 1 | 29-01-2005 18:38 |
| Random Numbers | Astronouth7303 | Programming | 9 | 18-01-2004 21:39 |
| Team Numbers | archiver | 2000 | 2 | 24-06-2002 00:24 |
| Numbers at VCU | Madison | Regional Competitions | 5 | 10-03-2002 02:26 |