首页 > lang > ang 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh eo
前一个  下一个  编辑  重命名  撤销  搜索  管理  
文档  
警告! 该页面未翻译。  参见英文版 
Ang
Angle = Ang ( X AS Float , Y AS Float ) AS Float

This function calculates the arc tangent of the two variables X and Y. It is similar to calculating the arc tangent of X / Y, except that the signs of both arguments are used to determine the quadrant of the result.

The function returns the result in radians, which is between -π and π (inclusive).

This is the same function as ATan2 except that the arguments are inverted.

To convert rectangular coordinates to polar coordinates, use Mag to get the distance and this function to get the angle.

Example

PRINT Deg(Ang(-1, 1))

135

参见

Trigonometric Functions