Function glm::builtin::outerProduct [] [src]

pub fn outerProduct<T: BaseFloat, C: GenFloatVec<T>, R: GenFloatVec<T>, N: GenMat<T, R, R = C, Transpose = M>, M: GenMat<T, C, R = R, Transpose = N>>(
    c: C,
    r: R
) -> M

Treats the first parameter c as a column vector (matrix with one column) and the second parameter r as a row vector (matrix with one row) and does a linear algebraic matrix multiply c * r, yielding a matrix whose number of rows is the number of components in c and whose number of columns is the number of components in r.

Example

let v2 = vec2(1., 2.);
let v3 = vec3(4., 0., -1.);
let e = mat3x2(4., 8., 0., 0., -1., -2.);
let op: Mat3x2 = outerProduct(v2, v3);
assert_eq!(op, e);