Programming ??? Math Question

The debug functionality using serial.print has been making my life a lot easier. It does slow the program down a whole lot but it is easy enough to turn on and off.

I did get my line function working so I though I would post my result in case anyone stumbles on this post looking for the same thing. It works pretty fast but if anyone see a way to improve on it please post.

// set all the points on a line to a color
void Line(byte x1, byte y1, byte z1, byte x2, byte y2, byte z2, byte Color)
{
int x,y,z;
float xSlope, ySlope, zSlope;

// Lengths
int xLength = x1 - x2;
int yLength = y1 - y2;
int zLength = z1 - z2;

// absolute lengths
int xAbsolute = abs(xLength);
int yAbsolute = abs(yLength);
int zAbsolute = abs(zLength);

// determine longest line
int MaxLength;
if ((xAbsolute > yAbsolute) & (xAbsolute > zAbsolute)) MaxLength = xAbsolute;
else if (yAbsolute > zAbsolute) MaxLength = yAbsolute;
else MaxLength = zAbsolute;

// calculate the slope change each cycle
xSlope = xLength/-MaxLength;
ySlope = yLength/-MaxLength;
zSlope = zLength/-MaxLength;;

for (int t=0; t<MaxLength+1; t++)
{
x = x1 + (int)(xSlope * t);
y = y1 + (int)(ySlope * t);
z = z1 + (int)(zSlope * t);
Pixel(x,y,z,Color);
}
}