首页 > 文档 > tan() 正切
2017
07-12

tan() 正切

名称:tan()

 

例子:

tan() 正切 - 第1张  | Processing编程艺术

float a = 0.0;
float inc = TWO_PI/50.0;

for (int i = 0; i < 100; i = i+2) {
line(i, 50, i, 50+tan(a)*2.0);
a = a + inc;
}

 

描述:

计算一个角度的正弦和余弦的比值。 该函数需要以弧度方式表示角度的参数值(从0到PI * 2的值)。返回值的范围为负无穷大到正无穷大。

 

语法:

tan(angle)

 

参数:

angle float: an angle in radians      弧度

 

返回:float

 

相关:

cos()
sin()
radians()



最后编辑:
作者:Hewes
这个作者貌似有点懒,什么都没有留下。

tan() 正切》有 2 条评论

  1. Pingback 引用通告: atan2() | Processing编程艺术

  2. Pingback 引用通告: atan() 反正切 | Processing编程艺术

留下一个回复

你的email不会被公开。