Hi and thanks for all your answers. In the meantime, I myself came up with what I think would be pretty quick:
Suppose we have a parallelogram spanned by PQ and PR, where PQ and PR are vectors (P, Q and R are angles). In addition, we have a point that we want to check by the name A.
We know that the vector PA can be divided into two vectors parallel to PQ and PR:
PA=n*PQ+m*PR
Now we know that n and m MUST be in the interval [0; 1], we solve n and m:
n = -det(PA, PQ)/det(PQ, PR)
m = det(PA, PR)/det(PQ, PR)
Where det (PA, PQ) is the determinant of the vectors PA and PQ:
det(PA, PQ) = PA.x*PQ.y-PQ.x*PA.y
A , 0 <= n <= 1 0 <= m <= 1, :
var d:Number = det(PQ, PR);
if (0 <= -det(PA, PQ)/d <= 1 && 0 <= det(PA, PR)/d <= 1)
{
}
else
{
}