Code computing the cross-product
- by WizardOfOdds
This is not a dupe of my question:
http://stackoverflow.com/questions/2532810/detecting-one-points-location-compared-to-two-other-points
If I have the following piece of pseudo-C/Java/C# code:
int a[]= { 30, 20 };
int b[] = { 40, 50 };
int c[] = {12, 12};
How do I compute the sign of the cross-product ABxAC?
I'm only interested in the sign, so I have:
boolean signABxAC = ?
Now concretely what do I write to get the sign of the cross-product ABxAC?