negate static method

Vec2D negate(
  1. Vec2D result,
  2. Vec2D a
)

Implementation

static Vec2D negate(Vec2D result, Vec2D a) {
  result.x = -1 * a.x;
  result.y = -1 * a.y;

  return result;
}