import math


def calculateTierSize(imageWidth, imageHeight, tileSize=256):
    """ The function calculate the number of tiles per tier
    
    Arguments:
        imageWidth {Float}
        imageHeight {Float}
        tileSize {Integer} Default is 256 pixel
    Return:
        {Array} """
    tierSizeInTiles = []
    while (imageWidth > tileSize or imageHeight > tileSize):
        tileWidth = imageWidth / tileSize
        tileHeight = imageHeight / tileSize
        tierSizeInTiles.append([math.ceil(tileWidth), math.ceil(tileHeight)])
        tileSize += tileSize
    tierSizeInTiles.append([1.0, 1.0])      
    return tierSizeInTiles