like this or more fancy?
PS: i know the float comparison is harder than this due to precision loss, just an example
int drawLine(floatX1,float Y1,float Y1,float Y2,float steps)
{
for(float i = 0.0; i <= 1.0; i += (1.0 / steps))
{
DrawDot(X1+i*(X2-X1),Y1+i*(Y2-Y1));
}
return 1;
}