atan2.3 (3a8617a83f16ffc9db4f96e1f0f21af94078e6b1) | atan2.3 (7a15a32a17f4c2cbeb6f842c4c6b1cf93e4639e7) |
---|---|
1.\" Copyright (c) 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91 | 1.\" Copyright (c) 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91 |
33.\" $Id: atan2.3,v 1.3 1993/08/14 13:42:32 mycroft Exp $ | 33.\" $Id: atan2.3,v 1.1.1.1 1994/08/19 09:39:41 jkh Exp $ |
34.\" 35.Dd May 2, 1991 36.Dt ATAN2 3 37.Os 38.Sh NAME | 34.\" 35.Dd May 2, 1991 36.Dt ATAN2 3 37.Os 38.Sh NAME |
39.Nm atan2 40.Nd arc tangent function of two variables | 39.Nm atan2 , 40.Nm atan2f 41.Nd arc tangent functions of two variables |
41.Sh SYNOPSIS 42.Fd #include <math.h> 43.Ft double 44.Fn atan2 "double y" "double x" | 42.Sh SYNOPSIS 43.Fd #include <math.h> 44.Ft double 45.Fn atan2 "double y" "double x" |
46.Ft float 47.Fn atan2f "float y" "float x" |
|
45.Sh DESCRIPTION 46The | 48.Sh DESCRIPTION 49The |
47.Xr atan2 48function computes the principal value of the arc tangent of 49.Ar y/ Ns Ar x , | 50.Fn atan2 51and the 52.Fn atan2f 53functions compute the principal value of the arc tangent of 54.Fa y/ Ns Ar x , |
50using the signs of both arguments to determine the quadrant of 51the return value. 52.Sh RETURN VALUES 53The | 55using the signs of both arguments to determine the quadrant of 56the return value. 57.Sh RETURN VALUES 58The |
54.Xr atan2 55function, if successful, 56returns the arc tangent of 57.Ar y/ Ns Ar x | 59.Fn atan2 60and the 61.Fn atan2f 62functions, if successful, 63return the arc tangent of 64.Fa y/ Ns Ar x |
58in the range 59.Bk -words 60.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi 61.Ek 62radians. 63If both | 65in the range 66.Bk -words 67.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi 68.Ek 69radians. 70If both |
64.Ar x | 71.Fa x |
65and | 72and |
66.Ar y | 73.Fa y |
67are zero, the global variable 68.Va errno 69is set to 70.Er EDOM . 71On the 72.Tn VAX : 73.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___ 74.It Fn atan2 y x No := Ta --- 115 unchanged lines hidden --- | 74are zero, the global variable 75.Va errno 76is set to 77.Er EDOM . 78On the 79.Tn VAX : 80.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___ 81.It Fn atan2 y x No := Ta --- 115 unchanged lines hidden --- |