title: C# Normalize (like a vector)
body: <p>Code in my moving object:</p>
  
  <pre><code>ObjectX.Location.Add(Velocity * Utils.GetMoveDir(start, destination));
  </code></pre>
  
  <p>Utility function:</p>
  
  <pre><code>    public static PointF GetMoveDir(PointF start, PointF destination)
      {
          PointF substraction = destination.SubStract(start);
          if (substraction == PointF.Empty) // If-statement is needed because normalizing a zero value results in a NaN value
              return PointF.Empty;
          else
              return substraction.Normalize(); // &lt;&lt;&lt;&lt; I need something for this
      }
  </code></pre>
  
  <p>The extension I can't get to work:</p>
  
  <pre><code>    public static PointF Normalize(this PointF A)
      {
          throw new NotImplementedException(); // How do I solve this to make it like: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2.normalize.aspx
      }
  </code></pre>
  
  <p>Note that I do NOT use the XNA framework.</p>