i1 %= f1;
i1 is a float
f1 is a double
i know the mod operator has to be in int.
so would
Code:(((int)(i1) %= (f1));
Printable View
i1 %= f1;
i1 is a float
f1 is a double
i know the mod operator has to be in int.
so would
Code:(((int)(i1) %= (f1));
typecasting i1 to int the way you are doing there makes no sense. What you need to be doing in this case is:
Code:i1 = (int)i1 % (int)f1;