atan2() \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0024+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name | ### atan2()
Description | Calculates the angle (in radians) from a specified point to the coordinate origin as measured from the positive x-axis. Values are returned as a float in the range from PI to -PI. The atan2() function is most often used for orienting geometry to the position of the cursor. Note the y-coordinate of the point is the first parameter and the x-coordinate is the second due the the structure of calculating the tangent.
Syntax |
    atan2(y, x);
Parameters |
x | int or float: x-coordinate of the point
y | int or float: y-coordinate of the point
Returns | float
Usage | Application
Related | acos() asin() atan() atan2() cos() cosh() hypot() sin() sinh() tan() tanh() radians() degrees()

Updated on January 11, 2010 09:41:48pm PST