Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Trigonometric functions
[Math Library]


Functions

double cos (double x)
 Compute cosine. Returns the cosine of an angle of x radians.
double sin (double x)
 Compute sine. Returns the sine of an angle of x radians.
double tan (double x)
 Compute tangent. Returns the tangent of an angle of x radians.
double acos (double x)
 Compute arc cosine. Returns the principal value of the arc cosine of x, expressed in radians. In trigonometrics, arc cosine is the inverse operation of cosine.
double asin (double x)
 Returns the principal value of the arc sine of x, expressed in radians. In trigonometrics, arc sine is the inverse operation of sine.
double atan (double x)
 Compute arc tangent. Returns the principal value of the arc tangent of x, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, the function cannot determine with certainty in which quadrant the angle falls only by its tangent value.
See atan2 for an alternative that takes a fractional argument instead.
double atan2 (double y, double x)
 Compute arc tangent with two parameters. Returns the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. If both arguments passed are zero, a domain error occurs.

Function Documentation

double acos double  x  ) 
 

Parameters:
x Value whose arc cosine is computed, in the interval [-1,+1]. If the argument is out of this interval, a domain error occurs.
Returns:
Principal arc cosine of x, in the interval [0,pi] radians. One radian is equivalent to 180/PI degrees.

double asin double  x  ) 
 

Parameters:
x Value whose arc sine is computed, in the interval [-1,+1]. If the argument is out of this interval, a domain error occurs.
Returns:
Principal arc sine of x, in the interval [-pi/2,+pi/2] radians. One radian is equivalent to 180/PI degrees.

double atan double  x  ) 
 

Parameters:
x Value whose arc tangent is computed.
Returns:
Principal arc tangent of x, in the interval [-pi/2,+pi/2] radians. One radian is equivalent to 180/PI degrees.

double atan2 double  y,
double  x
 

Parameters:
y Value representing the proportion of the y-coordinate.
x Value representing the proportion of the x-coordinate.
Returns:
Principal arc tangent of y/x, in the interval [-pi,+pi] radians. One radian is equivalent to 180/PI degrees.

double cos double  x  ) 
 

Parameters:
x Value representing an angle expressed in radians. One radian is equivalent to 180/PI degrees.
Returns:
Cosine of x radians.

double sin double  x  ) 
 

Parameters:
x Value representing an angle expressed in radians. One radian is equivalent to 180/PI degrees.
Returns:
Sine of x radians.

double tan double  x  ) 
 

Parameters:
x Value representing an angle, expressed in radians. One radian is equivalent to 180/PI degrees.
Returns:
Tangent of x radians.
footer

otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0