ATn2 function (LotusScript® Language)

Returns the polar coordinate angle, in radians, of a point in the Cartesian plane.

Syntax

ATn2 ( numExprX , numExprY )

Elements

numExprX, numExprY

Any numeric expressions. At least one of the two must be non-zero. numExprX and numExprY designate the coordinates of a point in the Cartesian plane.

Return value

ATn2 returns the angular portion of the polar coordinate representation of the point (numExprX, numExprY) in the Cartesian plane.

The range of the return value is -pi to pi, inclusively.

If numExprX is 0, then ATn2 returns one of the following values:

  • -pi/2, if numExprY is negative
  • pi/2, if numExprY is positive

If numExprX is positive, then ATn2(numExprX, numExprY) returns the same value as ATn(numExprY / numExprX).

Example