function _subexpressions(w0, w1, w2, f, g) {
    var t0 = w0 + w1;
    f[0] = t0 + w2;
    var t1 = w0 * w0;
    var t2 = t1 + w1 * t0;
    f[1] = t2 + w2 * f[0];
    f[2] = w0 * t1 + w1 * t2 + w2 * f[1];
    g[0] = f[1] + w0 * (f[0] + w0);
    g[1] = f[1] + w1 * (f[0] + w1);
    g[2] = f[1] + w2 * (f[0] + w2);
}
Helper function used in _computePolyhedralProperties.
Sets f0 - f2 and g0 - g2 depending on w0 - w2.

@method
@private
@param {Number} w0 Reference x coordinate.
@param {Number} w1 Reference y coordinate.
@param {Number} w2 Reference z coordinate.
@param {Number[]} f One of two output registers to contain the result of the calculation.
@param {Number[]} g One of two output registers to contain the result of the calculation.
@return {undefined} undefined