@univerjs/engine-render v0.5.4


Function: fixLineWidthByScale()

function fixLineWidthByScale(num, scale): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/tools.ts:244

When drawing lines, it is necessary to align their precision. performance testing var time = performance.now(); for(let i=0;i<100000000;i++){ fixLineWidthByScale(i, 0.666); }; console.log(performance.now()-time);

Parameters

ParameterType
numnumber
scalenumber

Returns

number