1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! # Geometry Rectangle Module
//!
//! This module provides generic, N-dimensional rectangles and related utilities for geometric computations.
//! It supports rectangles in arbitrary dimensions, with methods for construction, manipulation, cropping, intersection, and iteration.
//!
//! ## Features
//!
//! - Generic `Rectangle<T, N>` type for N-dimensional rectangles
//! - Construction from position and size, or from two corner points
//! - Querying rectangle corners, edges, and center points
//! - Cropping and margin operations
//! - Intersection checks
//! - Iteration over rectangle indices (for integer types)
//! - Traits for rectangle-like types (`IRectangle`, `Crop`)
//!
//! ## Usage
//!
//! ```rust
//! use hexga_math::prelude::*;
//!
//! let rect = rect2i(0, 0, 10, 10);
//! assert!(rect.is_inside(point2(5, 5)));
//!
//! let cropped = rect.crop_margin_intersect(point2(2, 2), point2(2, 2));
//! assert_eq!(cropped, rect2i(2, 2, 6, 6));
//! ```
//!
//! ## See Also
//!
//! - [`Vector`] for N-dimensional vector operations
//! - [`GetRectangle`] and [`SetRectangle`] trait for rectangle-like abstractions
//! - [`Crop`] trait for cropping operations
use *;
pub use *;
pub use *;
pub use *;