diff --git a/packages/dzi/package.json b/packages/dzi/package.json index aceafa4..62baf91 100644 --- a/packages/dzi/package.json +++ b/packages/dzi/package.json @@ -55,4 +55,4 @@ "lodash": "^4.17.21", "regl": "^2.1.0" } -} \ No newline at end of file +} diff --git a/packages/dzi/src/loader.ts b/packages/dzi/src/loader.ts index fd17b45..995730a 100644 --- a/packages/dzi/src/loader.ts +++ b/packages/dzi/src/loader.ts @@ -133,11 +133,10 @@ export function imageSizeAtLayer(dzi: DziImage, layer: number) { // solve for N, X = the larger the image dimensions: // X * (0.5^N) <= maxLayerSize ... // 0.5^N = maxLayerSize/X ... - // log_0.5(maxLayerSize/X) = N + // log_0.5(maxLayerSize/X) = N const bigger = Math.max(size[0], size[1]); - const N = Math.ceil(logBaseHalf(layerMaxSize / bigger)) + const N = Math.ceil(logBaseHalf(layerMaxSize / bigger)); return Vec2.ceil(Vec2.scale(size, 0.5 ** N)); - } export function tilesInLayer(dzi: DziImage, layer: number): box2D[][] { const { overlap, tileSize } = dzi;