use-polygon 0.0.6

Polygon primitives for the RustUse geometry workspace
Documentation
  • Coverage
  • 100%
    8 out of 8 items documented1 out of 8 items with examples
  • Size
  • Source code size: 5.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 310.98 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geometry
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-polygon

Polygon primitives for the RustUse geometry workspace.

use-polygon stores ordered planar vertices and provides a simple shoelace-area helper.

Example

use use_point::Point2;
use use_polygon::Polygon;

let polygon = Polygon::new(vec![
    Point2::new(0.0, 0.0),
    Point2::new(4.0, 0.0),
    Point2::new(0.0, 3.0),
]);

assert_eq!(polygon.area(), 6.0);