Re: Confused (timers)
Posted: June 6th, 2010, 12:41 pm
I faced that issue in cod1, the accuracy of my timer was 1/10 of a second, but sometimes both hud and iprintlnbold were showing values like 15.9997 for a reason i coudln't realize.
i solved that shit by looping:
i solved that shit by looping:
Code: Select all
value *= 10; // so 15.9997 becomes 159.997
value = (int)value; // 159;
value = (float)value/10;