This might be an esoteric question, but I wanted to know what the exact implementation is for the Rhino.Geometry.Vector3d.VectorAngle(Vector3d, Vector3d) method. I know there are a number of ways of calculating the angle between 3d vectors (using arccos or atan2). In 3d space, my vectors are based on a series of 3 points along a curve (so the first vector is V01, and the second is V12).

Based on testing in Grasshopper, I see that the angle is restricted to the 0 to pi range. I’m implementing a similar method in C++ program to try and replicate some results from a grasshopper script, so I’d like to get an implementation as close to the grasshopper definition as possible.