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.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 |
39.Nm atan2 , 40.Nm atan2f 41.Nd arc tangent functions of two variables |
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" |
48.Sh DESCRIPTION 49The |
50.Fn atan2 51and the 52.Fn atan2f 53functions compute the principal value of the arc tangent of 54.Fa y/ Ns Ar x , |
55using the signs of both arguments to determine the quadrant of 56the return value. 57.Sh RETURN VALUES 58The |
59.Fn atan2 60and the 61.Fn atan2f 62functions, if successful, 63return the arc tangent of 64.Fa y/ Ns Ar x |
65in the range 66.Bk -words 67.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi 68.Ek 69radians. 70If both |
71.Fa x |
72and |
73.Fa y |
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 --- |