Angle

Contents

Description

The angle(x, y) function returns the angle in radians measured between the positive X axis and the line joining the origin (0,0) with the point given by (x, y). The returned values range from 0 to 2pi. Note that angle(0, 0) returns a missing value because the result is undefined.

Syntax

double angle(double x, double y)

Parameter

x

the X-coordinate

y

the Y-coordinate

Return

Returns the angle in radians measured between the positive X axis and the line joining the origin (0,0) with the point given by (x, y).

Example

angle(1,1)=; //angle(1,1)=0.78539816339745

See Also

angleint1, angleint2