I am trying to find if a particular point lies on a line. What I have tried is . I find the slope of the line .Then I find the slope of the point with the initial coordinates of the line, say x1 and y1. IF both the slopes are equal then the point lies on the line .But because I am using double or even with float I get values with five decimal places and the slope are never equal. the code is as follows.
line.slope == (yTouch-line.yTouch1)/(xTouch-line.xTouch1)
Hi I am not able to add a comment.Can you please tell me what is an error delta