title: Check if a point projected on a line segment is not outside it
body: <p><img src="https://i.stack.imgur.com/mcB5O.png" alt="illustration"></p>
  
  <p>See the image above; basically, I want a simple test to check if a point is within the line segment's range. The information (or input, if you prefer) I have is the point's coordinates, and the line segment termination points' coordinates. The output I want is a simple boolean. How can I check this in a simple way?</p>