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

Function zero_radius

oxide_math/test/cone.rs:94–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 #[test]
93 #[should_panic]
94 fn zero_radius() {
95 let mut world = World::default();
96 let cone_entity: Entity = world.push((Cone {
97 radius: 1.0f32,
98 height: 1.0f32,
99 },));
100 set_cone_size(&mut world, &cone_entity, 0.0f32, 3.0f32);
101
102 if let Some(entry) = world.entry(cone_entity) {
103 let cone: Cone = *entry.get_component::<Cone>().unwrap();
104 assert_approx_eq!(cone.radius, 0.0f32);
105 assert_approx_eq!(cone.height, 3.0f32);
106 }
107 }
108
109 #[test]
110 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_cone_sizeFunction · 0.85

Tested by

no test coverage detected