in reply to Re^2: Check if line is straight
in thread Check if line is straight

Sorry for not being clear, I assumed that looking at the code will make it obvious which is clearly not the case, The problem i am trying to solve is that it is basically a join the dots application, There are fixed points say point 1 and point 2, when the mouse is moved from point 1 to point 2 i want to make sure the path is correct so I take the start x,y (point1) and end x, y(point2) and take the current position of the mouse (x,y) and make sure that the path is correct. my code works fine if there is a slope but if the points are vertical or horizontal (slope 0) then I was not sure how to make sure that the direction and path is correct( a slight deviation is ok). Hope this clears up the question