def box_normalized_tile_offset(x_norm, y_norm, x_tile, y_tile, size=6):
    """ Given a x normal and y normal and x and y tile with in the box return the offset
    usefull for calculating texture uniform offsets in an a texture atlas

    Args:
        x_norm: either 0 or 1 for left or right of the box
        y_norm: either 0 or 1 for the top or bottom of the box
        x_tile: x tile offset to fetch
        y_tile: y tile offset to fetch
        size: number of tiles in the grid

    Returns:
      x_norm: adjusted x normal
      y_norm: adjusted y normal

    Links:
    """
    if x_tile and y_tile >= size:
        return None
    ratio = 1.0 / size
    return ratio * x_tile + x_norm * ratio, ratio * y_tile + y_norm * ratio
