Function glm::builtin::matrixCompMult
[−]
[src]
pub fn matrixCompMult<T: BaseFloat, C: GenFloatVec<T>, M: GenMat<T, C>>(
x: &M,
y: &M
) -> M
Multiply matrix x
by matrix y
component-wise, i.e., result[i][j]
is
the scalar product of x[i][j]
and y[i][j]
.
Note
To get linear algebraic matrix multiplication, use the multiply operator
*
.
Example
use glm::{ matrixCompMult, mat3x2 }; let m1 = mat3x2(1., 4., 2., 5., 3., 6.); let m2 = mat3x2(2., 3., 2., 3., 2., 3.); let me = mat3x2(2., 12., 4., 15., 6., 18.); assert_eq!(matrixCompMult(&m1, &m2), me);