flipY static method

void flipY(
  1. Matrix4 projection,
  2. Matrix4 out
)

Writes projection with clip-space y negated into out. out may be projection itself.

Implementation

static void flipY(Matrix4 projection, Matrix4 out) {
  if (!identical(out, projection)) out.setFrom(projection);
  final s = out.storage;
  // Column-major: row 1 (clip y) is elements 1, 5, 9 and 13.
  s[1] = -s[1];
  s[5] = -s[5];
  s[9] = -s[9];
  s[13] = -s[13];
}