Metadata-Version: 2.4
Name: segment-intersection-2d
Version: 0.1.0
Summary: Calculate the intersection point of line segments in a two-dimensional plane.
License-Expression: MIT
License-File: LICENSE
Author: GGN_2015
Author-email: neko@jlulug.org
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Description-Content-Type: text/markdown

# segment_intersection_2d
Calculate the intersection point of line segments in a two-dimensional plane.

## Install

```bash
pip install segment_intersection_2d
```

## Usage

```python
from segment_intersection_2d import segment_intersection_2d

line_1_p_1 = (0, 0)
line_1_p_2 = (1, 1)
line_2_p_1 = (1, 0)
line_2_p_2 = (0, 1)
crs = segment_intersection_2d(line_1_p_1, line_1_p_2, line_2_p_1, line_2_p_2)
print(crs) # (0.5, 0.5)

line_1_p_1 = (0, 1)
line_1_p_2 = (0, 0)
line_2_p_1 = (1, 1)
line_2_p_2 = (1, 0)
crs = segment_intersection_2d(line_1_p_1, line_1_p_2, line_2_p_1, line_2_p_2)
print(crs) # None
```

