跳到主要内容

SIN

Returns the sine of an angle.

Syntax

expression.SIN(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe angle in radians for which the sine will be returned. If your argument is in degrees, multiply it by <em>PI()/180</em>.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.SIN(0.5));