I want to turn a decimal number into an integer.
I have been using:
int num = decimal;
However, when I use a decimal like: 9.999, I get 10. But I want 9.
Suggestions?
I want to turn a decimal number into an integer.
I have been using:
int num = decimal;
However, when I use a decimal like: 9.999, I get 10. But I want 9.
Suggestions?
What is a decimal number.
show us where it was declared. Was it declared as decimal?
Ok, I think I see what you want.
use floor(x)
That should return the highest integer lower than your float number.
Did that solve your question?