fromScaling function

dynamic fromScaling(
  1. List<double> out,
  2. List<double> v
)

Creates a matrix from a vector scaling This is equivalent to (but much faster than):

mat2.identity(dest);
mat2.scale(dest, dest, vec);

@param {mat2} out mat2 receiving operation result @param {ReadonlyVec2} v Scaling vector @returns {mat2} out

Implementation

fromScaling(List<double> out, List<double> v) {
  out[0] = v[0];
  out[1] = 0;
  out[2] = 0;
  out[3] = v[1];
  return out;
}