rspace_core/point.rs
1/*
2 Appellation: point <module>
3 Created At: 2025.12.29:14:01:09
4 Contrib: @FL03
5*/
6mod impl_point;
7mod impl_point_ext;
8mod impl_point_repr;
9
10/// The [`Point`] implementation is designed a generic, 2-dimensional point object used to
11/// define coordinates, vectors, or positions in a 2D space.
12#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
13#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
14#[repr(C)]
15pub struct Point<X, Y = X> {
16 #[cfg_attr(feature = "serde", serde(alias = "lhs", alias = "a"))]
17 pub x: X,
18 #[cfg_attr(feature = "serde", serde(alias = "rhs", alias = "b"))]
19 pub y: Y,
20}