@univerjs/engine-formula v0.5.0-beta.1 • Docs
Function: strip()
function strip(num, precision): number
Complete the number to the specified accuracy and solve the accuracy error,
e.g. strip(0.30000000000000004,15) => 0.3
Why precision is 15?
Excel only saves 15 digits
Parameters
Parameter | Type | Default value |
---|---|---|
num | number | undefined |
precision | number | 15 |
Returns
number
Defined in
submodules/univer/packages/engine-formula/src/engine/utils/math-kit.ts:190