etFromArray(goog.vec.vec2d.create(), [-1, -2]);
    var v1 = goog.vec.vec2d.create();

    goog.vec.vec2d.abs(v0, v1);
    assertElementsEquals([1, 2], v1);
    assertElementsEquals([-1, -2], v0);

    goog.vec.vec2d.abs(v0, v0);
    assertElementsEquals([1, 2], v0);
  }

  function testScale() {
    var v0 = goog.vec.vec2d.setFromArray(goog.vec.vec2d.create(), [1, 2]);
    var v1 = goog.vec.vec2d.create();

    goog.vec.vec2d.scale(v0, 4, v1);
    assertElementsEquals([4, 8], v1);
    assertElementsEquals(