Crates.io | geo-raycasting |
lib.rs | geo-raycasting |
version | 0.7.0 |
source | src |
created_at | 2019-10-24 19:39:57.176816 |
updated_at | 2024-08-08 19:09:42.128836 |
description | Ray Casting algorithm for the geo crate |
homepage | |
repository | https://github.com/nappa85/geo-raycasting |
max_upload_size | |
id | 175308 |
size | 23,204 |
A simple implementation of Ray Casting algorithm for geo crate, inspired by the code found on https://rosettacode.org/wiki/Ray-casting_algorithm
Example:
use geo_raycasting::RayCasting;
use geo_types::LineString;
fn main() {
let poly_square: LineString<f64> = vec![(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0), (0.0, 0.0)].into();
assert!(poly_square.within(&(5.0, 5.0).into()));
}