跳到主要内容

FLOOR_PRECISE

Returns a number that is rounded down to the nearest integer or to the nearest multiple of significance. The number is always rounded down regardless of its sign.

Syntax

expression.FLOOR_PRECISE(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe numeric value to round down.
arg2OptionalApiRange | ApiName | numberThe multiple of significance to round down to. If it is omitted, the default value of 1 is used. If it is set to zero, the function returns 0.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.FLOOR_PRECISE(-6.7, 2));