determining fractional component
Is there an easy way to get the fractional component of a float?
Basically, I''m adding and subbing a set amt from a float, and I need to determine when the variable is a mathematical integer.
Thanks
yckx
Try to cast it to an int.
This should throw the fractional part away.
Now subtract this from your float.
There it is.
Hope this works!
The Wild Wild West - Desperado!
This should throw the fractional part away.
Now subtract this from your float.
There it is.
Hope this works!
The Wild Wild West - Desperado!
The Wild Wild West - Desperado!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement