()
| 260 | |
| 261 | #[test] |
| 262 | fn point_to_segment_perpendicular() { |
| 263 | let d = point_to_segment_dist_sq([5.0, 1.0], [0.0, 0.0], [10.0, 0.0]); |
| 264 | assert!((d - 1.0).abs() < 1e-10); // 1 unit away |
| 265 | } |
| 266 | |
| 267 | #[test] |
| 268 | fn point_to_segment_endpoint() { |
nothing calls this directly
no test coverage detected