跳到主要内容

SQRTPI

返回(数字 * pi)的平方根。

语法

expression.SQRTPI(arg1);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | numberpi 乘以的数字。

返回值

number

示例

计算(数字 * pi)的平方根。

// The SQRTPI function returns the square root of the product of a number and pi (3.14159...).

// Get the square root of (5 * pi) and place it in cell A1.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.SQRTPI(5));