Crates.io | geo-raycasting |
lib.rs | geo-raycasting |
version | 0.3.0 |
source | src |
created_at | 2019-10-24 19:39:57.176816 |
updated_at | 2021-01-20 10:35:05.010702 |
description | Ray Casting algorithm for the geo crate |
homepage | |
repository | https://github.com/nappa85/geo-raycasting |
max_upload_size | |
id | 175308 |
size | 21,669 |
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()));
}