C convert floating point to int my_var = (int)my_var; As simple as that. Basically you don’t need it if the variable is int.