vec3.angle(a,b)
-
Hello,
I am new to jscad. I was using OpenSCAD and didn't know about jscad until recently but I'm loving it.
On to my comment:
vec3.angle(a, b) returns the angle using acos. Because acos(-x) = acos(x) it returns the absolute value of the angle, i.e. it leaves out the direction. Maybe the absolute angle is useful but my use case is to roll geometry from a to b, so I want not only the magnitude but the direction. I can still get it another way.
But thank you for all the hard work.
-
@sopatt Sorry to the late reply.
You probably already know this but an ''orientation" is required to determine the rotation, and sign of the angle.
This is probably the best implementation out there. And if you want then this could be added to the vec3 functions.
-
@sopatt Thanks for the feedback.
FYI, Most computations are based upon the glMatrix library (glmatrix.net)
I will double check but this is probably the same functionality as glmatrix.