title: Check if geolocation is within boundaries
body: <p>I'm trying to generate some geolocations within the borders of an area right now I'm trying to generate geo locations within these boundaries</p>
  
  <pre><code>$bounds = array(
      array(55.4024447, 13.1656691),
      array(56.1575776, 15.8350261),
      array(68.0410163, 17.4600359),
      array(58.9380148, 11.3501468),
      array(67.6820048, 16.1964251)
  );
  </code></pre>
  
  <p>and right now my checking for this is as follows</p>
  
  <pre><code>if (
      ($bounds[0][0] &lt; $lat &amp;&amp; $bounds[0][1] &lt; $lng) &amp;&amp;
      ($bounds[1][0] &lt; $lat &amp;&amp; $bounds[1][1] &gt; $lng) &amp;&amp;
      ($bounds[2][0] &gt; $lat &amp;&amp; $bounds[2][1] &gt; $lng) &amp;&amp;
      ($bounds[3][0] &gt; $lat &amp;&amp; $bounds[3][1] &lt; $lng) &amp;&amp;
      ($bounds[4][0] &gt; $lat &amp;&amp; $bounds[4][1] &gt; $lng)
  ) {
  </code></pre>
  
  <p>however this only gets locations within a square in the middle not in the entire area
  do you have any idea of how to check within the full area instead?</p>