// Compute the absolute doubled area of a simple planar polygon from its vertex coordinates using the shoelace sum. pub fn polygon_double_area(xs: vector, ys: vector) -> f64 { if len(xs)!=len(ys) || len(xs)<3 { return 0.0; } let mut j = len(xs)-1; let mut i = 0; let mut area = 0.0; while i