How do i get the fractional part of something in C.

Started by
0 comments, last by dampe64 21 years, 2 months ago
example: if (fractional part of "my variable" == 0) how would i do that
Advertisement
float var;
...
if (var == (int)(var))
do_stuff;
// or
if (var-((int)var) == 0)
do_stuff;
Assassin, aka RedBeard. andyc.org

This topic is closed to new replies.

Advertisement