Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

atan2

atan2

The atan2 function in XQuery returns the angle in radians subtended at the origin by the point on a plane with coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.

Syntax

math:atan2(arg1, arg2)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg1
Required
The y-coordinate or numerator in the quotient (tan θ = y/x).
arg2
Required
The x-coordinate or denominator in the quotient.

Return Value

  • Returns the angle in radians between the positive x-axis and the point
    (x, y)
    .
  • Returns an empty sequence if either input is an empty sequence.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT (approximate)
math:atan2(0, 1)
0
math:atan2(1, 1)
0.78539816339
math:atan2(1, 0)
1.57079632679
math:atan2(-1, -1)
-2.35619449019
math:atan2((), 2)
()
math:atan2(1, ())
()

Additional information

  • The function helps determine the angle taking into account the signs of both coordinates, providing the correct quadrant.
  • Inputs must be numeric and can be positive, negative, or zero.
  • It handles empty inputs gracefully by returning an empty sequence.

0 COMMENTS

We’d like to hear from you!