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
Yes, I see now. I don't know why I did not see this before. Anyway, thank you.... Regards Erik
See also ceil(), floor() in math.h. float.h has a FLT_ROUNDS #define that tells you which way the system rounds floating point (up, down, toward zero, nearest, etc).