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

Function zero_radius

oxide_math/test/sphere.rs:51–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 #[test]
50 #[should_panic]
51 fn zero_radius() {
52 let mut world = World::default();
53 let sphere_entity: Entity = world.push((Sphere { radius: 1.0f32 },));
54 set_sphere_size(&mut world, &sphere_entity, 0.0f32);
55
56 if let Some(entry) = world.entry(sphere_entity) {
57 let sphere: Sphere = *entry.get_component::<Sphere>().unwrap();
58 assert_approx_eq!(sphere.radius, 0.0f32);
59 }
60 }
61}

Callers

nothing calls this directly

Calls 1

set_sphere_sizeFunction · 0.85

Tested by

no test coverage detected