pub fn eliptic_deviation(polygon: Polygon<'_>, precision: usize) -> f64
Expand description

Compute the deviation beween the polygon and the related elipse using a scanline algorithm. precision is the number of lines used to compute the deviation. The more lines, the more precise the result will be.

use geometric_features::related_ellipse::eliptic_deviation;
let polygon: Vec<(f64,f64)> = vec![
    ( 8.04,  2.68),
    ( 5.4,   4.4 ),
    ( 6.1,   6.5 ),
    ( 9.24,  6.22),
    (12.12,  5.26),
    ( 9.86,  4.38),
    ( 10.0,  2.42),
    ( 8.86,  4.14)
];
assert_eq!(eliptic_deviation(&polygon, 100), 0.5378961702988894);