title: XNA, C# - Check if a Vector2 path crosses another Vector2 path
body: <p>I have an XNA question for those with more experience in these matters than myself (maths).</p>
  
  <p>Background: I have a game that implements a boundary class, this simply hosts 2 Vector2 objects, a start and an end point. The current implementation crudely handles collision detection by assuming boundaries are always vertical or horizontal, i.e. if start.x and end.x are the same check I am not trying to pass x etc.</p>
  
  <p>Ideally what I would like to implement is a method that accepts two Vector2 parameters. The first being a current location, the second being a requested location (where I would like to move it to assuming no objections). The method would also accept a boundary object. What the method should then do is tell me if I am going to cross the boundry in this move. this could be a bool or ideally something representing how far I can actually move. </p>
  
  <p>This empty method might explain better than I can in words.</p>
  
  <pre><code>        /// &lt;summary&gt;
      /// Checks the move.
      /// &lt;/summary&gt;
      /// &lt;param name="current"&gt;The current.&lt;/param&gt;
      /// &lt;param name="requested"&gt;The requested.&lt;/param&gt;
      /// &lt;param name="boundry"&gt;The boundry.&lt;/param&gt;
      /// &lt;returns&gt;&lt;/returns&gt;
      public bool CheckMove(Vector2 current, Vector2 requested, Boundry boundry)
      { 
          //return a bool that indicated if the suggested move will cross the boundry.
          return true;
      }
  </code></pre>