Hàm atan2( ) tính arctan của x/y

double atan2(double y, double x);

Parameter:

x, y: góc (radian)

Remark:

Hàm atan2( ) tính arctan của x/y.

Ví dụ:

#include <math.h>
#include "conio.h"
#include <stdio.h>

void main( void )
{
    double x = 1.0, y = 4.5;

    printf( "atan2( %.2f, %.2f ) = %f\n", x, y, atan2(x, y));
    getch();
}

Kết quả:

Hàm atan2

Be the first to comment

Leave a Reply