API Reference
@univerjs
@univerjs/engine-render
functions
Fixlinewidthbyscale

@univerjs/engine-render v0.4.2Docs


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

submodules/univer/packages/engine-render/src/basics/tools.ts:244 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.