import { v3_matrix4_rotate } from "./v3_matrix4_rotate.js";

/**
 * Perform rotation on a direction vector using 3x3 portion of a 4x4 matrix
 * NOTE: produces a normalized vector
 * @param {number[]|Float32Array} output
 * @param {number} output_offset
 * @param {number[]|Float32Array} input
 * @param {number} input_offset
 * @param {number[]|Float32Array} m4
 */
export function v3_array_matrix4_rotate(
    output, output_offset,
    input, input_offset,
    m4
) {
    const x = input[input_offset];
    const y = input[input_offset + 1];
    const z = input[input_offset + 2];

    v3_matrix4_rotate(output,output_offset,x,y,z,m4);
}
