jax-js
    Preparing search index...

    Function atan2

    • Element-wise arc tangent of y/x with correct quadrant.

      Returns the angle in radians between the positive x-axis and the point (x, y). The result is in the range [-π, π].

      Uses numerically stable formulas:

      • When x >= 0: atan2(y, x) = 2 * atan(y / (sqrt(x^2 + y^2) + x))
      • When x < 0: atan2(y, x) = 2 * atan((sqrt(x^2 + y^2) - x) / y)

      The output is ill-defined when both x and y are zero.

      Parameters

      Returns Array

    Properties

    dispose: () => void