Matrix.rotFromTo

Returns rotation matrix which converts a vector to another vector.

  1. Matrix rotFromTo(Vector!(T, 3) from, Vector!(T, 3) to)
    struct Matrix(T, uint U, uint V)
    static
    static if(U == V)
    static if(U == 3)
    rotFromTo
    (
    const Vector!(T, 3) from
    ,
    const Vector!(T, 3) to
    )
    if (
    __traits(isArithmetic, T)
    )
  2. Matrix rotFromTo(Vector!(T, 3) from, Vector!(T, 3) to)

Parameters

from Vector!(T, 3)

before vector, which must be normalized

to Vector!(T, 3)

after vector, which must be normalized

Return Value

Type: Matrix

rotation matrix

Meta