rspace_core/elem/point.rs
1/*
2 Appellation: point <module>
3 Contrib: FL03 <jo3mccain@icloud.com>
4*/
5use super::RawPoint;
6
7/// A point in a space.
8///
9#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
10#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
11pub struct BasePoint<S>
12where
13 S: RawPoint,
14{
15 pub(crate) data: S,
16}
17
18impl<S, A> BasePoint<S>
19where
20 S: RawPoint<Elem = A>,
21{
22 pub fn new(data: S) -> Self {
23 Self { data }
24 }
25
26
27}