@univerjs/engine-formula v0.4.2 • 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
packages/engine-formula/src/engine/utils/math-kit.ts:190 (opens in a new tab)