MCPcopy Create free account
hub / github.com/OxideEngine/Oxide / zero_width_height_and_length

Function zero_width_height_and_length

oxide_math/test/cube.rs:179–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 #[test]
178 #[should_panic]
179 fn zero_width_height_and_length() {
180 let mut world = World::default();
181 let rect_entity: Entity = world.push((Cube {
182 width: 1.0f32,
183 height: 1.0f32,
184 length: 1.0f32,
185 },));
186 set_cube_size(&mut world, &rect_entity, 0.0f32, 0.0f32, 0.0f32);
187
188 if let Some(entry) = world.entry(rect_entity) {
189 let cube: Cube = *entry.get_component::<Cube>().unwrap();
190 assert_approx_eq!(cube.width, 0.0f32);
191 assert_approx_eq!(cube.height, 0.0f32);
192 assert_approx_eq!(cube.length, 0.0f32);
193 }
194 }
195}

Callers

nothing calls this directly

Calls 1

set_cube_sizeFunction · 0.85

Tested by

no test coverage detected