identity function

List<double> identity(
  1. List<double> out
)

Set a mat2 to the identity matrix

@param {mat2} out the receiving matrix @returns {mat2} out

Implementation

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