ATAN2
Returns the arctangent of the specified x and y coordinates, in radians between -Pi and Pi, excluding -Pi.
Syntax
expression.ATAN2(arg1, arg2);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The x coordinate of the point. | |
arg2 | Required | ApiRange | ApiName | number | The y coordinate of the point. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.ATAN2(1, -9));