MCPcopy Create free account
hub / github.com/amethyst/bracket-lib / test_in_bounds

Function test_in_bounds

bracket-algorithm-traits/src/algorithm3d.rs:82–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81 #[test]
82 fn test_in_bounds() {
83 struct TestMap {}
84 impl BaseMap for TestMap {}
85 impl Algorithm3D for TestMap {
86 fn dimensions(&self) -> Point3 {
87 Point3::new(2, 2, 2)
88 }
89 }
90
91 let map = TestMap {};
92 assert!(map.in_bounds(Point3::new(0, 0, 0)));
93 assert!(map.in_bounds(Point3::new(1, 1, 1)));
94 assert!(!map.in_bounds(Point3::new(3, 3, 3)));
95 }
96
97 #[test]
98 fn test_point3d_to_index() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected