geo-raycasting

Crates.iogeo-raycasting
lib.rsgeo-raycasting
version0.7.0
sourcesrc
created_at2019-10-24 19:39:57.176816
updated_at2024-08-08 19:09:42.128836
descriptionRay Casting algorithm for the geo crate
homepage
repositoryhttps://github.com/nappa85/geo-raycasting
max_upload_size
id175308
size23,204
Marco Napetti (nappa85)

documentation

https://docs.rs/geo-raycasting/

README

geo-raycasting

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()));
}
Commit count: 6

cargo fmt