`atan2`

Generic Description

Computes the quadrant-aware arctangent from y and x components. It is documented separately because numeric transforms change ranking, thresholds, and buckets in ways planner tools must not guess.

Simple example:

RETURN atan2(1.0, 1.0) AS value

Consumer-Level Explanation

Use it for directional features where sign on both axes matters. Prefer this function when the transformation is a deliberate part of the model or report, and name the derived value in a WITH stage when it will be reused.

More Detailed Explanation

atan2 is scalar math, so it is evaluated per row after graph patterns, procedure output, or map projections have produced values. Keep it close to the query when thresholds, ranking, and derived fields need to be auditable and reproducible.

Advanced Example

This example applies atan2 to a named score component after matching graph data, making the derived metric reviewable before ordering.

WITH [{x: 1.0, y: 1.0}, {x: -1.0, y: 2.0}] AS vectors
UNWIND vectors AS v
RETURN v.x AS x, v.y AS y, atan2(v.y, v.x) AS angle_radians

Real Use Cases

Real Limitations And Tradeoffs