UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

26 lines (20 loc) 501 B
/** * * @param {number[]|Float32Array} a * @param {number} a_offset * @param {number[]|Float32Array} b * @param {number} b_offset * @returns {number} */ export function v3_dot_array_array( a, a_offset, b, b_offset ) { const a_x = a[a_offset]; const a_y = a[a_offset + 1]; const a_z = a[a_offset + 2]; const b_x = b[b_offset]; const b_y = b[b_offset + 1]; const b_z = b[b_offset + 2]; return a_x * b_x + a_y * b_y + a_z * b_z; }