跳转至

Arctan2(Arctan2(反正切函数))

Supported in: Batch, Faster, Streaming

Returns the angle θ between the ray from the origin to the point (x, y) and the positive x-axis, confined to −π<θ<=π.

Expression categories: Numeric

Declared arguments

  • Angle unit: Output angle unit which is either degrees or radians.
    Enum\
  • X: X coordinate value.
    Expression\
  • Y: Y coordinate value.
    Expression\

Output type: Double

Examples

Example 1: Base case

Argument values:

  • Angle unit: degrees
  • X: x
  • Y: y
y x Output
0.0 0.0 0.0
1.0 0.0 90.0
0.0 -1.0 180.0
-1.0 0.0 -90.0

Example 2: Null case

Argument values:

  • Angle unit: radians
  • X: null
  • Y: 0.0

Output: null



中文翻译


Arctan2(反正切函数)

支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

返回从原点到点 (x, y) 的射线与正 x 轴之间的夹角 θ,取值范围为 −π<θ≤π。

表达式类别: 数值(Numeric)

声明的参数

  • 角度单位(Angle unit): 输出角度的单位,可选度(degrees)或弧度(radians)。
    枚举类型\
  • X: X 坐标值。
    表达式\
  • Y: Y 坐标值。
    表达式\

输出类型: Double

示例

示例 1:基础情况

参数值:

  • 角度单位: degrees
  • X: x
  • Y: y
y x 输出
0.0 0.0 0.0
1.0 0.0 90.0
0.0 -1.0 180.0
-1.0 0.0 -90.0

示例 2:空值情况

参数值:

  • 角度单位: radians
  • X: null
  • Y: 0.0

输出: null