scale function

dynamic scale(
  1. List<double> out,
  2. List<double> a,
  3. List<double> v
)

Scales the mat2 by the dimensions in the given vec2

@param {mat2} out the receiving matrix @param {ReadonlyMat2} a the matrix to rotate @param {ReadonlyVec2} v the vec2 to scale the matrix by @returns {mat2} out */

Implementation

scale(List<double> out, List<double> a, List<double> v) {
  final a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
  final v0 = v[0], v1 = v[1];
  out[0] = a0 * v0;
  out[1] = a1 * v0;
  out[2] = a2 * v1;
  out[3] = a3 * v1;
  return out;
}