()
| 2315 | |
| 2316 | #[test] |
| 2317 | fn test_classify_angle() { |
| 2318 | use math::{classify_angle, AngleType}; |
| 2319 | assert_eq!(classify_angle(0.0), AngleType::Zero); |
| 2320 | assert_eq!(classify_angle(std::f32::consts::TAU), AngleType::Zero); |
| 2321 | assert_eq!(classify_angle(-std::f32::consts::TAU), AngleType::Zero); |
| 2322 | assert_eq!(classify_angle(std::f32::consts::FRAC_PI_2), AngleType::Right90); |
| 2323 | assert_eq!(classify_angle(std::f32::consts::PI), AngleType::Straight180); |
| 2324 | assert_eq!(classify_angle(3.0 * std::f32::consts::FRAC_PI_2), AngleType::Right270); |
| 2325 | match classify_angle(1.0) { |
| 2326 | AngleType::Arbitrary(v) => assert!((v - 1.0).abs() < 0.01), |
| 2327 | other => panic!("Expected Arbitrary, got {:?}", other), |
| 2328 | } |
| 2329 | } |
| 2330 | |
| 2331 | #[test] |
| 2332 | fn test_compute_rotated_aabb_zero() { |
nothing calls this directly
no test coverage detected