function square(x, y, nx, ny, innerWeight, outerWeight, clockwise, /* rotation for square (true at left end, false at right end) */ verts) {
    var ix = x - (nx * innerWeight);
    var iy = y - (ny * innerWeight);
    var ox = x + (nx * outerWeight);
    var oy = y + (ny * outerWeight);
    /* Rotate nx,ny for extension vector */
    var exx;
    var eyy;
    if (clockwise) {
        exx = ny;
        eyy = -nx;
    }
    else {
        exx = -ny;
        eyy = nx;
    }
    /* [i|0]x,y extended at cap */
    var eix = ix + exx;
    var eiy = iy + eyy;
    var eox = ox + exx;
    var eoy = oy + eyy;
    /* Square itself must be inserted clockwise*/
    verts.push(eix, eiy);
    verts.push(eox, eoy);
    return 2;
}
Buffers vertices to draw a square cap.

Ignored from docs since it is not directly exposed.
@ignore
@private
@param {number} x - X-coord of end point
@param {number} y - Y-coord of end point
@param {number} nx - X-coord of line normal pointing inside
@param {number} ny - Y-coord of line normal pointing inside
@param {number} innerWeight - Weight of inner points
@param {number} outerWeight - Weight of outer points
@param {boolean} clockwise - Whether the cap is drawn clockwise
@param {Array<number>} verts - vertex buffer
@returns {number} - no. of vertices pushed