azimuth#
- zeroheliumkit.src.utils.azimuth(p1: tuple | Point, p2: tuple | Point) float[source]#
Returns the azimuth angle between two points (from x-axis).
- Parameters:
p1 (tuple or Point) – The coordinates of the first point.
p2 (tuple or Point) – The coordinates of the second point.
- Returns:
The azimuth angle in degrees, measured clockwise from the positive x-axis.
- Return type:
float
- Raises:
ValueError – If p1 and p2 are the same Point object or have the same values.
Example
>>> p1 = (0, 0) >>> p2 = (1, -1) >>> result = azimuth(p1, p2) >>> print(result) -45.0