math.atan
Defined in module
"math"from "math" import atanReturns the arctangent of x
Parameters
x | number | value whose arctangent is wanted |
Return value
The arctangent of x, in the range [-PI/2, PI/2], always as a float.
Notes
Unlike asin and acos, x is defined for every real number, so there is no domain to clamp.
Example
from "math" import atan
println("atan(0) =", atan(0))
println("atan(1) =", atan(1))
println("atan(-1) =", atan(-1))
// unlike asin/acos, atan has no restricted domain
println("type(atan(1)) =", type(atan(1)))Output:
atan(0) = 0
atan(1) = 0.785398
atan(-1) = -0.785398
type(atan(1)) = floatSee also
atan2 | Returns the arctangent of y/x using the signs to determine the quadrant |
asin | Returns the arcsine of x |
acos | Returns the arccosine of x |
PI | The ratio of a circle's circumference to its diameter, for converting between radians and degrees and for angle math in general. |
| math | module index |