title: Is a point inside regular hexagon
body: <p>I'm looking for advice on the best way to proceed. I'm trying to find whether a given point A:(a, b) is inside a regular hexagon, defined with center O:(x, y) and diameter of circumscribing circle. </p>
  
  <p>It seems like overkill to use Ray-casting, or Winding-number to determine this, for such a simple case, and I'm currently looking at the option of finding the angle (from horizontal) of the line OA, and "normalising" (probably not the right word) it into one of the 6 equilateral triangles and seeing if this new point lies within this triangle.</p>
  
  <p>I get the feeling I'm missing something simple, and there's an easy way (or if I'm really lucky, a Java API) to do this simply and efficiently.</p>
  
  <p>Thanks for your help.</p>
  
  <p><strong>Edit</strong>: The hexagon is oriented such that one of the sides is flat with the horizontal.</p>