multiplyScalar function

List<double> multiplyScalar(
  1. List<double> out,
  2. List<double> a,
  3. double b
)

Multiply each element of the matrix by a scalar.

@param {mat2} out the receiving matrix @param {ReadonlyMat2} a the matrix to scale @param {Number} b amount to scale the matrix's elements by @returns {mat2} out

Implementation

List<double> multiplyScalar(List<double> out, List<double> a, double b) {
  out[0] = a[0] * b;
  out[1] = a[1] * b;
  out[2] = a[2] * b;
  out[3] = a[3] * b;
  return out;
}