title: How to check if a point lies on a line between 2 other points
body: <p>How would I write this function? Any examples appreciated</p>
  
  <pre><code>function isPointBetweenPoints(currPoint, point1, point2):Boolean {
  
      var currX = currPoint.x;
      var currY = currPoint.y;
  
      var p1X = point1.x;
      var p1y = point1.y;
  
      var p2X = point2.x;
      var p2y = point2.y;
  
      //here I'm stuck
  }
  </code></pre>