修改demo

This commit is contained in:
tsm 2024-10-10 20:10:26 +08:00
parent 122c01a166
commit b0e0f97022
2 changed files with 1 additions and 1 deletions

View File

@ -52,6 +52,7 @@ export function getScale(sourceWidth: number, sourceHeight: number, requestedWid
} }
} }
//四舍五入
export function round(value: number): number { export function round(value: number): number {
return Math.floor(value + 0.5); return Math.floor(value + 0.5);
} }

View File

@ -54,7 +54,6 @@ export class Downsampler {
} }
} }
} }
getDownsampler(downsampType: DownsampleStrategy) { getDownsampler(downsampType: DownsampleStrategy) {
switch (downsampType) { switch (downsampType) {
case DownsampleStrategy.FIT_CENTER_MEMORY: case DownsampleStrategy.FIT_CENTER_MEMORY: