The error from the line is still using floats .
What operation in the original code produces something that is not an integer?
If you read the code which was originally posted you would have see the use of floats and not have asked.
I am rather confused. Are you saying that the code mutated? The code in the first post (which doesn't seem to have been altered) uses the type `float' but none of the operations can possibly result in a value that doesn't represent an integer. If you disagree with this, please explain what operation produces something that is not an integer.
public static boolean solidSpace (int x0, int y0, int x1, int y1)
{
float dx = Math.abs(x1-x0);
float dy = Math.abs(y1-y0);
float err = dx-dy;
while (true)
{
float e2 = 2*err;
if (e2 > -dy)
{
err -= dy;
}
if (e2 < dx)
{
err += dx;
}
}
}
The code above is from the original post with only the parts relating to floating point numbers left. Subtracting 2 integers does result in an integer but the result is then placed into a floating point number which will get converted into a floating point number.
Rereading what you have said, you asked what in the original code does not use floats and I have shown which parts of the code does use floating points. I think what you meant that floating points are not needed as all the maths involved can be represented with integer maths.