Initializes a quaternion from a 3D vector representing an axis and a number representing an angle (that is, an axis-angle rotation).
// Returns 0.7071 + 0i + 0.7071j + 0kconst q = Chalkboard.quat.fromAxis(Chalkboard.vect.init(0, 1, 0), Chalkboard.PI(0.5)); Copy
// Returns 0.7071 + 0i + 0.7071j + 0kconst q = Chalkboard.quat.fromAxis(Chalkboard.vect.init(0, 1, 0), Chalkboard.PI(0.5));
The vector
The angle in radians
Initializes a quaternion from a 3D vector representing an axis and a number representing an angle (that is, an axis-angle rotation).
Example