I am using C (not C ++).
I need to convert a floating point number in int. I do not want to round to the nearest number, I just want to exclude what is after the integer part. Sort of
int
4.9 -> 4 .9 -> 4
my_var = (int)my_var;
So simple. Basically you don't need this if the variable is int.
Use in c
int C = var_in_float;
They transform implicit
thank
Source: https://habr.com/ru/post/1548250/More articles:How to fade corners / edges / borders UIImageView - ioshow to add part of face A to part of face B, which is most important for matching color tones - objective-cJSON object via jQuery message for php - jsonexecution order in case of multiple inheritance - c ++How to use callback mechanism? - javaClosure Compiler does not always include listings. What for? - javascriptJAVA_OPTS installed in catalina.sh does not work for a private instance of TOMCAT - javaCinema 4d R13.dae не будет импортировать в SceneKit - scenekitLegend of a survival plan - rSmooth polygons of Three.js model - javascriptAll Articles