// Apply an even-odd ray crossing test to an open or closed polygon ring. Supply a query off the boundary. pub fn point_in_ring(xs: vector, ys: vector, x: f64, y: f64) -> bool { if len(xs)!=len(ys) || len(xs)<3 { return false; } let mut inside = false; let mut j = len(xs)-1; let mut i = 0; while iy)!=(b>y) { let crossing = at(xs,i)+(y-a)*(at(xs,j)-at(xs,i))/(b-a); if x