I thinks this is a dummy question, but I don´t find the solution.
I need to compute angles between points or vectors, but the angle does not always occur in the same direction. How in this example, the angle between XA-XB and XA-XC is anticlockwise, but not the XA-XD. For the angle XA-XD I need to have the 200° and not the 160°.
Any advice?
One way to calculate the angles between points or vectors in different directions is to use the dot product and the cross product. The dot product can be used to compute the angle between two vectors, while the cross product can be used to determine the direction of the angle (i.e. clockwise or counterclockwise). Specifically, the cross product of two vectors can be used to compute a third vector that is perpendicular to both of the original vectors. If the resulting vector points in the same direction as the positive z-axis, then the angle between the two original vectors is counterclockwise, otherwise, it’s clockwise.
Another way is to use atan2, which is a variant of the arctangent function, that can determine the angle between two vectors in 2D space. It can distinguish between angles in the range of -180 and 180 degrees.
A very simple way to get oriented angles is to provide a plane to the Angle component.
In addition to that, assuming what you are after is the dimension display, you need to test if the value is below or above 180° and flip the dimension if necessary.