Hi all, I like to round a float to the nearest integer value and assign the value to an integer. How do I do that in C code? In know it is something with "round" but I can not find the proper syntacs. Does someone know? Regards, Erik
"Add 0.5 to the float variable and then cast it to an integer" Or if the float is negative, add -0.5.