Python/ref math atan
来自菜鸟教程
<languages />
Python math.atan()方法
例
返回不同数字的反正切:
#Import math Library
import math
#fReturn the arc tangent of
different numbers
print (math.atan(0.39))
print (math.atan(67))
print (math.atan(-21))
定义和用法
The
math.atan()
方法返回数字的反正切(
x
)作为介于-PI / 2和PI / 2弧度之间的数值。
反正切也定义为的反正切函数 x ,哪里 x 是要计算的反正切值。
句法
math.atan(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 需要。正数或负数。If
x 不是数字,则返回错误TypeError |
技术细节
| 返回值: | A
|
| Python版本: | 1.6.1 |