tan


描述

In a right angled triangle tan(val) = Opposite / Adjacent where val is one of the three angles.

注意:返回的值是弧度,而不是角度。
NOTE:Pi/2, (3 pi/2), -pi/2 and a vast number of other values will error with this function due to their returning infinity, a graph representation of this would produce asymptotes at these values.


语法:

tan(val);


参数 描述
val The angle (in radians) to return the tangent of.


Returns:

实数


例如:

val = tan( pi );

这会将val设为0。