04-03-2016, 07:55 PM

This HP Prime function calculates an angle between 0 and 2 pi radians using the sin and cosine of the angle provided by the user.

It is called ATAN3 because FORTRAN has a function called ATAN2 that calculates an angle between plus and minus pi.

The syntax of this function is a follows;

EXPORT ATAN3(a, b)

// four quadrant inverse tangent

// input

// a = sine of angle

// b = cosine of angle

// output

// 0 =< angle <= 2 pi

////////////////////

It is called ATAN3 because FORTRAN has a function called ATAN2 that calculates an angle between plus and minus pi.

The syntax of this function is a follows;

EXPORT ATAN3(a, b)

// four quadrant inverse tangent

// input

// a = sine of angle

// b = cosine of angle

// output

// 0 =< angle <= 2 pi

////////////////////