/**
 * Cross product
 * @param {number[]|Float32Array} output
 * @param {number} output_offset
 * @param {number[]|Float32Array} a
 * @param {number} a_offset
 * @param {number[]|Float32Array} b
 * @param {number} b_offset
 */
export function v3_cross_array(
    output, output_offset,
    a, a_offset,
    b, b_offset,
) {

    const ax = a[a_offset];
    const ay = a[a_offset + 1];
    const az = a[a_offset + 2];

    const bx = b[b_offset];
    const by = b[b_offset + 1];
    const bz = b[b_offset + 2];

    const x = ay * bz - az * by;
    const y = az * bx - ax * bz;
    const z = ax * by - ay * bx;

    output[output_offset] = x;
    output[output_offset + 1] = y;
    output[output_offset + 2] = z;
}