2.1.16.1.2 angle


Description

Return the phase (angle) in radians of a planar vector with coordinates (x, y)

Syntax

double angle( double x, double y )

Parameters

x
[input] x-coordinate
y
[input] y-coordinate

Return

the phase (angle)

Examples

EX1

void    angle_ex1()
{
    double        x = 1.;
    double        y = 1.;
    double        rAngle = angle(x, y);
    printf("angle(%f, %f) = %f\n", x, y, rAngle);
}

Remark

See Also

Header to Include

origin.h

Reference