> 
> **Possible Duplicate:**  
> 
> [Finding whether a point lies inside a rectangle or not](https://stackoverflow.com/questions/2752725/finding-whether-a-point-lies-inside-a-rectangle-or-not) 
> 
> 
> 

There is an interview question that is, "How to determine whether a point lies inside a rectangle"

Note that the rectangle could be rotated as well. So the simple solution of checking point inside the rectangle doesn't stands valid here...

Please share your thoughts on this question..

I found a link on internet, and was trying to understand it, but failed.... Please if any body out here can give complete solution with bit of computer graphics logic, because i have forgotten all the basics.... 
[How to determine if a point is inside rectangle.](http://www.ihas1337code.com/2010/04/how-to-determine-if-point-is-inside.html)