Reputation: 183
I am using https://openjscad.org/
I have two-fold question about javascript vector rotate:
vec=vec.rotateX(angle0);
vec=vec.rotateY(angle1);
vec=vec.rotateZ(angle2);
1) Does javascript rotates vectors in degrees or radians?
2) How these 3 lines would translate rotating vector by another vector? Such as vec = vec.rotate(angle,new Vector(1,0,0))? for angle 1
3) Is there any documentation about vector rotate in javascript? I want to understand the logic...
Upvotes: 0
Views: 92
Reputation: 183
It was degrees equivalent to
Vector3d vec = new Vector3d(1.15,58.1,7.58); vec.Rotate(Rhino.RhinoMath.ToRadians(10.4),Vector3d.XAxis);
vec.Rotate(Rhino.RhinoMath.ToRadians(15.3),Vector3d.YAxis);
vec.Rotate(Rhino.RhinoMath.ToRadians(17.7),Vector3d.ZAxis);
Upvotes: 1