Is there some way I can get the value of the non integral portion of a double

Started by
20 comments, last by Unliterate 19 years, 10 months ago
sprintf() is your friend.

That would do it in no time at all.
Advertisement
double foo = 1.333;
double non_integral_foo = 1.333 - (double)((int)foo);

This topic is closed to new replies.

Advertisement