Skip to content

Commit f6348d7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f7febf5 commit f6348d7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎maths/line_intersection.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def determinant(a: float, b: float, c: float, d: float) -> float:
1818
# Function to compute the line equation coefficients from two points
1919
def line_coefficients(p1: list[float] | tuple, p2: list[float] | tuple) -> tuple:
2020
"""
21-
Computes the coefficients A, B, C of the line equation Ax + By + C = 0
21+
Computes the coefficients A, B, C of the line equation Ax + By + C = 0
2222
from two points.
2323
2424
Args:
@@ -27,7 +27,7 @@ def line_coefficients(p1: list[float] | tuple, p2: list[float] | tuple) -> tuple
2727
2828
Returns:
2929
tuple: Coefficients (A, B, C) of the line equation.
30-
30+
3131
Examples:
3232
# Vertical line (x = constant)
3333
>>> line_coefficients([1, 0], [1, 2])
@@ -45,7 +45,7 @@ def line_coefficients(p1: list[float] | tuple, p2: list[float] | tuple) -> tuple
4545
>>> line_coefficients([0, 1], [1, 0])
4646
(-1.0, -1, 1)
4747
"""
48-
48+
4949
if p1[0] == p2[0]: # Vertical line
5050
return 1, 0, p1[0]
5151
else: # Non-vertical line

0 commit comments

Comments
 (0)