devela/num/geom/metric/extent/
mod.rs

1// devela::num::geom::metric::extent
2//
3//! A geometrical extent.
4//
5
6mod impl_traits;
7mod methods;
8
9/// An orthogonal extension in `D`-space without a coordinate position.
10///
11/// Represents the lengths of each dimension in a multi-dimensional space,
12/// providing an origin-agnostic shape with the implied form of an orthotope
13/// (generalized rectangle or box).
14#[must_use]
15#[repr(transparent)]
16pub struct Extent<T, const D: usize> {
17    /// The D-dimensional size.
18    pub size: [T; D],
19}
20/// A 2-dimensional [`Extent`].
21pub type Extent2d<T> = Extent<T, 2>;
22/// A 3-dimensional [`Extent`].
23pub type Extent3d<T> = Extent<T, 3>;