/**
 * Cross product `a × b`, written to `result[result_offset .. result_offset+2]`.
 *
 * Scalar-argument companion to {@link v3_cross_array} (which takes both operands
 * at array offsets): use this when the operands are already in registers/locals,
 * to avoid staging them into a buffer just to cross them. Allocation-free.
 *
 * @param {number[]|Float32Array|Float64Array} result destination
 * @param {number} result_offset offset into `result`
 * @param {number} ax @param {number} ay @param {number} az  first vector
 * @param {number} bx @param {number} by @param {number} bz  second vector
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export function v3_cross(result, result_offset, ax, ay, az, bx, by, bz) {
    result[result_offset] = ay * bz - az * by;
    result[result_offset + 1] = az * bx - ax * bz;
    result[result_offset + 2] = ax * by - ay * bx;
}
