How do I convert a floating point number to an integer, at the same time rounding up the number? not truncating it, but rounding it up...
i forgot the function for it...
How do I convert a floating point number to an integer, at the same time rounding up the number? not truncating it, but rounding it up...
i forgot the function for it...
Only by the cross are you saved...
>How do I convert a floating point number to an integer, at the same time rounding up the number?
double d = 1.7;
int i = (int)(d + .5);
My best code is written with the delete key.