/**
 * Returns other vertex ID
 * Assumes that given vertex belongs to this edge
 * Assumes that given edge exists
 * @param {BinaryTopology} mesh
 * @param {number} edge_id edge ID
 * @param {number} vertex_id
 * @returns {number}
 */
export function bt_edge_other_vertex(mesh, edge_id, vertex_id) {

    const v1 = mesh.edge_read_vertex1(edge_id);
    const v2 = mesh.edge_read_vertex2(edge_id);

    if (v1 === vertex_id) {
        return v2;
    } else {
        return v1;
    }

}
