Quaternion.rotFromTo

Returns rotation quaternion which converts a vector to another vector.

struct Quaternion(T)
static
rotFromTo
(
const Vector!(T, 3) from
,
const Vector!(T, 3) to
)
if (
__traits(isArithmetic, T)
)

Parameters

from Vector!(T, 3)

before vector, which must be normalized

to Vector!(T, 3)

after vector, which must be normalized

Return Value

Type: Quaternion!T

rotation quaternion

Meta