{"id":16113118,"url":"https://github.com/cuppachino/intersection_detection","last_synced_at":"2025-04-06T07:28:19.310Z","repository":{"id":211003082,"uuid":"727948853","full_name":"cuppachino/intersection_detection","owner":"cuppachino","description":"Compute generic 2D line intersections","archived":false,"fork":false,"pushed_at":"2023-12-07T07:38:52.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T10:49:18.785Z","etag":null,"topics":["2d","algebraic-geometry","intersection","triangulation"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/intersection_detection","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuppachino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-05T22:54:29.000Z","updated_at":"2023-12-06T00:14:10.000Z","dependencies_parsed_at":"2024-10-31T23:40:43.354Z","dependency_job_id":"68c679c3-b46f-420c-9175-a9b6eb0fbf9d","html_url":"https://github.com/cuppachino/intersection_detection","commit_stats":null,"previous_names":["cuppachino/intersection_detection"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Fintersection_detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Fintersection_detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Fintersection_detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Fintersection_detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuppachino","download_url":"https://codeload.github.com/cuppachino/intersection_detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247447766,"owners_count":20940389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","algebraic-geometry","intersection","triangulation"],"created_at":"2024-10-09T20:10:20.904Z","updated_at":"2025-04-06T07:28:19.293Z","avatar_url":"https://github.com/cuppachino.png","language":"Rust","readme":"# intersection_detection\n\nThis crate provides functionality for computing intersections between line segments in 2D space.\nIt defines types for representing intersections and includes methods for checking intersection results,\nconverting between intersection types, and rounding intersection components to a specified precision.\n\n## Usage\n\nTo use this crate, add it as a dependency to your `Cargo.toml` file:\n\n```rust\n[dependencies]\nintersection_detection = \"0.1.3\"\n```\n\n## Example\n\n```rust\nuse intersection_detection::{IntersectionResult, Line, PointLike};\n\nfn main() {\n    let line1 = Line::new([0.0, 0.0], [1.0, 1.0]);\n    let line2 = Line::new([0.0, 1.0], [1.0, 0.0]);\n\n    let computation = line1\n            .intersection(\u0026line2)\n            .try_into_intersection()\n            .ok();\n\n    assert_eq!(computation, Some(Intersection::Point([0.5, 0.5])));\n}\n```\n\n## Points\n\nImplement `FromIntoPointLike` to use custom types as points.\n\nOut-of-the-box implementations are provided for:\n\n- `[F; 2]`\n- `[F; 3]`\n- `(F, F)`\n- `(F, F, F)`\n\n\u003e **Note:** This crate re-exports the `point_like` crate, which is a trait for types that can be used as points.\n\u003e The idea here was to let users determine float precision and avoid forcing usage of a specific algebra crate.\n\u003e However, most of the methods in `PointLike` are \"inspired\" by the `glam` crate, so I would recommend using that if you're fine with `f32`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Fintersection_detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuppachino%2Fintersection_detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Fintersection_detection/lists"}