commonlibsse_ng\re\b/
BSTPoint.rs

1use num_traits::Num;
2
3// NOTE: `BSTPointDefaultOps` is inlined due to the inhibition of Rust struct reuse by Empty base optimization (EBO).
4
5#[repr(C)]
6#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7pub struct BSTPoint2<T: Num> {
8    pub x: T,
9    pub y: T,
10}
11const _: () = {
12    assert!(core::mem::offset_of!(BSTPoint2<f32>, x) == 0);
13    assert!(core::mem::offset_of!(BSTPoint2<f32>, y) == 4);
14
15    assert!(core::mem::size_of::<BSTPoint2<f32>>() == 8);
16};
17
18#[repr(C)]
19#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
20pub struct BSTPoint3<T: Num> {
21    pub x: T,
22    pub y: T,
23    pub z: T,
24}
25const _: () = {
26    assert!(core::mem::offset_of!(BSTPoint3<f32>, x) == 0);
27    assert!(core::mem::offset_of!(BSTPoint3<f32>, y) == 4);
28    assert!(core::mem::offset_of!(BSTPoint3<f32>, z) == 8);
29
30    assert!(core::mem::size_of::<BSTPoint3<f32>>() == 0xC);
31};