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

/**
 *
 * @param {number} finger_print
 * @returns {number}
 */
export function finger_print_to_tile_address(finger_print) {
    // decode fingerprint
    const mip = (finger_print >> 24) & 0xFF;
    const x = (finger_print >> 16) & 0xFF;
    const y = (finger_print >> 8) & 0xFF;

    return compose_tile_address(mip, x, y);
}

