/**
 * Read out a pair of planes from a numeric array
 * @param {number[]|Float32Array} source
 * @param {number} source_offset
 * @param {number[]|Float64Array|Float32Array} destination
 * @param {number} destination_offset
 */
export function read_plane_pair(source, source_offset, destination, destination_offset) {

    const a_n_x = source[source_offset];
    const a_n_y = source[source_offset + 1];
    const a_n_z = source[source_offset + 2];
    const a_constant = source[source_offset + 3];

    const b_n_x = -source[source_offset + 4];
    const b_n_y = -source[source_offset + 5];
    const b_n_z = -source[source_offset + 6];
    const b_constant = -source[source_offset + 7];

    destination[destination_offset] = a_n_x;
    destination[destination_offset + 1] = a_n_y;
    destination[destination_offset + 2] = a_n_z;
    destination[destination_offset + 3] = a_constant;

    destination[destination_offset + 4] = b_n_x;
    destination[destination_offset + 5] = b_n_y;
    destination[destination_offset + 6] = b_n_z;
    destination[destination_offset + 7] = b_constant;
}
