shorten(by) {
    let f = Vector2.subtract(this.from, this.to);
    f.normalize();
    f.multiplyScalar(by / 2.0);
    this.to.add(f);
    this.from.subtract(f);
    return this;
  }
Shortens this line from both directions by a given value (in pixels).

@param {Number} by The length in pixels to shorten the vector by.
@returns {Line} This line.