atan
double  atan ( double x );
math.h
  cplusplus.com  

Calculate arctangent.
  Performs the trigonometric arctangent operation on x and returns an angle in the range from -PI/2 to PI/2 expressed in radians.

Parameters.

x
Value whose arctangent has to be calculated.

Return Value.
  Arctangent of x.

Portability.
  Defined in ANSI-C.
  ANSI-C++ adds float and double overloaded versions of this function, with the same bahavior but being both, parameter and result, of one of these types.

Example.

/* atan example */
#include <stdio.h>
#include <math.h>

#define PI 3.14159265

main ()
{
  double param, result;
  param = 5;
  result = atan (param) * 180 / PI;
  printf ("Arctangent of %lf is %lf degrees\n", param, result );
  return 0;
}
Output:
Arctangent of 5.000000 is 78.690068 degrees

See also.
  atan2, acos, asin, cos, sin, tan


© The C++ Resources Network, 2000