atan2.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 36 行

GML
36
字号
.func atan2
#include <math.h>
double atan2( double y, double x );
.ixfunc2 '&Math' &func
.ixfunc2 '&Trig' &func
.funcend
.desc begin
The &func function computes the principal value of the arctangent of
.arg y/x,
using the signs of both arguments
to determine the quadrant of the return value.
A domain error occurs if both arguments are zero.
.desc end
.return begin
The &func function returns the arctangent of
.arg y/x,
in the range (&minus.&pi.,&pi.).
.im errnodom
.return end
.see begin
.seelist atan2 acos asin atan matherr
.see end
.exmp begin
#include <stdio.h>
#include <math.h>

void main()
  {
    printf( "%f\n", atan2( .5, 1. ) );
  }
.exmp output
0.463648
.exmp end
.class ANSI
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?