Skip to main content

TAN

Returns the tangent of an angle.

Syntax

expression.TAN(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe angle in radians for which the tangent will be returned. If the 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.TAN(0.5));