Bug? build #3326
i have something like this
double a;
int b = 3;
int c = 5;
a = 1.0 * b / c;
I do this because i want to get b / c stored a, but avoid integer type loosing of precision. Idea suggests to me that "1.0 * b" is equivalent with just "b", and that is wrong (the text gets colored).
3 / 5 = 0 and 1.0 * 3 / 5 = 0.6
Please sign in to leave a comment.
Definitly a bug, guess you should file it in Jira.
Still a strange way to achieve what you want. A non-initiated co-programmer might well remove the '1.0 * ' because he'll also think its redundant.
How about this?
a = ((double) b) / c;