Atn 函数Atn function

返回指定数字的余切值的 DoubleReturns a Double specifying the arctangent of a number.

语法Syntax

atn (number)Atn(number)

必需的 number 参数Double 或任何有效的 数值表达式The required number argument is a Double or any valid numeric expression.

备注Remarks

Atn 函数选取直角三角形 (number) 的两条边的比率并返回相应的角度(以弧度为单位)。The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. 该比率通过将与角相对的边的长度除以与角相邻的边的长度得出。The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

[注意!]这相当于 Excel 中的 ATAN () 函数。[NOTE!] This is the equivalent of the ATAN() function in Excel. 很奇特的是 ,Excel.WorksheetFunctions.ATAN () 与其他 Excel 公式函数 (一样) 。Oddly, Excel.WorksheetFunctions.ATAN() does not exist (as with other Excel formula functions). 您可以改为使用此 VBA Atn () 函数。You can instead use this VBA Atn() function.

结果的范围为 - pi/2 到 pi/2 弧度。The range of the result is -pi/2 to pi/2 radians. 若要将角度转换为弧度,请将角度乘以 pi/180。To convert degrees to radians, multiply degrees by pi/180. 若要将弧度转换为角度,请将弧度乘以 180/pi。To convert radians to degrees, multiply radians by 180/pi.

备注

AtnTan 的反三角函数,它以角度作为参数并返回直角三角形的两条边的比率。Atn is the inverse trigonometric function of Tan, which takes an angle as its argument and returns the ratio of two sides of a right triangle. 不要将 Atn 与余切混淆,后者只是正切 (1/tangent) 的倒数。Do not confuse Atn with the cotangent, which is the simple inverse of a tangent (1/tangent).

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.