Rhombus inside Rectangle : testing coordinates
Hi, I am building a web game, and I came across a small issue you might help me with:
I have a rhombus inside a rectangle, and some random coordinates inside the rectangle. I have to test if these coordinates are inside the rhombus or outside of it. That’s it!
I know everything about the rectangle and rhombus (angles & length)
I could devise an ugly switch case to determine this, but I was wondering if they’re wasn’t a better (and faster ;)) approach to this problem.