space_partitioning/quadtree/point.rs
1#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2pub struct Point {
3 pub x: i32,
4 pub y: i32,
5}
6
7impl Point {
8 pub fn new(x: i32, y: i32) -> Self {
9 Self { x, y }
10 }
11}
12
13#[cfg(test)]
14mod test {
15 use super::*;
16
17 #[test]
18 fn point_is_8_bytes() {
19 assert_eq!(std::mem::size_of::<Point>(), 8);
20 }
21}