Math.atan2 Function

Returns the angle (in radians) from the X axis to a point (y,x).

语法

Math.atan2(y, x)

参数

x

必要参数。A numeric expression representing the cartesian x-coordinate.

y

必要参数。A numeric expression representing the cartesian y-coordinate.

备注

The return value is between -pi and pi. It represents the angle of the supplied (y,x) point, in radians.

Applies ToMath Object

必备条件

在以下文档模式中受支持:怪异模式、Internet Explorer 6标准模式、Internet Explorer 7标准模式、Internet Explorer 8标准模式、Internet Explorer 9标准模式、Internet Explorer 10标准模式、Internet Explorer 11标准模式。应用商店应用(Windows 8和Windows Phone 8.1)中也受支持。请参阅版本信息

如果你喜欢这篇文章,敬请给站长打赏↑

除特别注明外,本站所有文章均为本站站长原译,转载请注明出处。