transformed method Null safety

Vector4 transformed(
  1. Vector4 arg,
  2. [Vector4? out]

Transform a copy of arg of type Vector4 using the transformation defined by this. If a out parameter is supplied, the copy is stored in out.


Vector4 transformed(Vector4 arg, [Vector4? out]) {
  if (out == null) {
    out = Vector4.copy(arg);
  } else {
  return transform(out);