use-bounds 0.0.6

Axis-aligned 2D bounds helpers for RustUse geometry
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented1 out of 16 items with examples
  • Size
  • Source code size: 10.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 353.34 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-bounds

Axis-aligned bounds helpers for the RustUse geometry workspace.

Example

use use_bounds::Aabb2;
use use_point::Point2;

let bounds = Aabb2::from_points(Point2::new(4.0, 1.0), Point2::new(1.0, 3.0));

assert_eq!(bounds.min(), Point2::new(1.0, 1.0));
assert_eq!(bounds.max(), Point2::new(4.0, 3.0));
assert!(bounds.contains_point(Point2::new(2.0, 2.0)));