linearly v0.32.0Docs


linearly v0.32.0 / quat / rotationTo

Function: rotationTo()

rotationTo(a, b): quat

Sets a quaternion to represent the shortest rotation from one vector to another.

Both vectors are assumed to be unit length.

Parameters

a: vec3

the initial vector

b: vec3

the destination vector

Returns

quat

Defined in

src/quat.ts:573open in new window