title: How do I calculate the normal vector of a line segment?
body: <p>Suppose I have a line segment going from (x1,y1) to (x2,y2). How do I calculate the normal vector perpendicular to the line?</p>
  
  <p>I can find lots of stuff about doing this for planes in 3D, but no 2D stuff.</p>
  
  <p>Please go easy on the maths (links to worked examples, diagrams or algorithms are welcome), I'm a programmer more than I'm a mathematician ;)</p>