negate function

List<double> negate(
  1. dynamic out,
  2. dynamic a
)

Negates the components of a vec2

@param {vec2} out the receiving vector @param {ReadonlyVec2} a vector to negate @returns {vec2} out

Implementation

List<double> negate(out, a) {
  out[0] = -a[0];
  out[1] = -a[1];
  return out;
}