title: get closest point to a line
body: <p>I'd like to have a straight forward C# function to get a closest point (from a point P) to a line-segment, AB. An abstract function may look like this. I've search through SO but not found a usable (by me) solution.</p>
  
  <pre><code>public Point getClosestPointFromLine(Point A, Point B, Point P);
  </code></pre>