Let \(C(x,y)\) be the coordinates of the point, \(A (a,b)\) - vector start coordinates, \(B(c,d)\) - vector end coordinates. First, let's find out if the point lies on the line AB! To do this, you need to calculate the skew product of the vectors AB and AC! If it is zero, then the point lies on the line! Then calculate the scalar product of the vectors AB< /code> and AC! If it is >=0 then the point belongs to the ray defined by the vector otherwise not.