@univerjs/engine-render v0.5.0-beta.1Docs


Function: fixLineWidthByScale()

function fixLineWidthByScale(num, scale): number

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

Defined in

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