devela/num/geom/metric/orientation.rs
1// devela::num::geom::metric::direction
2//
3//! Defines [`Orientation`].
4//
5
6#[cfg(doc)]
7use crate::{Distance, Position};
8
9/// A unitless directional vector in `D`-dimensional space.
10///
11/// Represents **only the direction of movement**, without an absolute
12/// reference point or inherent magnitude. It is **typically normalized**
13/// to remove scale dependence.
14///
15/// - Unlike [`Position`], `Orientation` **does not describe a fixed location**.
16/// - Unlike [`Distance`], `Orientation` **does not measure separation**.
17///
18/// This type does **not enforce normalization**, but it is expected
19/// to be normalized in most use cases.
20#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
21pub struct Orientation<T, const D: usize> {
22 /// The directional components in `D`-dimensional space.
23 pub dim: [T; D],
24}