get_abc_line#
- zeroheliumkit.src.utils.get_abc_line(p1: tuple | Point, p2: tuple | Point) tuple[source]#
- Calculates the coefficients (a, b, c) of the line equation Ax + By + C = 0
that passes through two points p1 and p2.
- Parameters:
p1 (tuple | Point) – The first point on the line.
p2 (tuple | Point) – The second point on the line.
- Returns:
A tuple (a, b, c) representing the coefficients of the line equation.
- Return type:
tuple
- Raises:
ValueError – If p1 and p2 are the same Point object or have the same values.
Example
>>> p1 = (1, 2) >>> p2 = (3, 4) >>> result = get_abc_line(p1, p2) (-2, 2, 2)