atan

AutoCad AutoLISP Functions

 
atan
 
 
 

Returns the arctangent of a number in radians

(atan num1 [num2]) 

Arguments

num1

A number.

num2

A number.

Return Values

The arctangent of num1, in radians, if only num1 is supplied. If you supply both num1 and num2 arguments, atan returns the arctangent of num1/num2, in radians. If num2 is zero, it returns an angle of plus or minus 1.570796 radians (+90 degrees or -90 degrees), depending on the sign of num1. The range of angles returned is -pi/2 to +pi/2 radians.

Examples

Command: (atan 1)

0.785398

Command: (atan 1.0)

0.785398

Command: (atan 0.5)

0.463648

Command: (atan 1.0)

0.785398

Command: (atan -1.0)

-0.785398

Command: (atan 2.0 3.0)

0.588003

Command: (atan 2.0 -3.0)

2.55359

Command: (atan 1.0 0.0)

1.5708