The answer to Direct way of computing clockwise angle between 2 vectors was helpful in getting the clockwise angle between two vectors, but what I need to know is how to get the angle from two vectors going in the clockwise direction from a specific vector.
Here's a visual explanation of what I am trying to say. When going in the clockwise direction from the red vector, the clockwise angle is this: (Excuse the bad drawing)
But when going in the clockwise direction from the black vector, the clockwise angle is this:
EDIT: I'll rephrase my question. This is what I am trying to achieve. I have been following this old but useful link on generating triangle meshes: http://www.geom.uiuc.edu/~samuelp/del_project.html#algorithms
With the above images, I always want the angle going in a clockwise direction from a specific vector. I have been using the code from the linked SO answer to get the angle, but its incorrect in my situation
float dotProd = vx*ux + vy*uy;
float det = vx*uy - vy*ux;
float angle = MathUtils.atan2(det, dotProd);//in radians
if(angle < 0) angle += MathUtils.PI;
The angle calculation incorrectly allows unnecessary edges to be connected.
How can I fix this?