Ahoy friends. I'm writing some code using the PAWN language (C similar) but i need to optimize the run time. So i wan't to try to use bitwise operations here. I got my function to round integers but i need to rewrite it to take a little time less.
Can someone explain how to convert these operations into bitwise operations and why? And how can they optimize the run time of the program if they do exactly the same?
Thanks for your help!
stock round(num)
{
new rem = num % 10;
return rem >= 5 ? (num - rem + 10) : (num - rem);
}