MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / point_to_segment_perpendicular

Function point_to_segment_perpendicular

nodedb-spatial/src/predicates/edge.rs:262–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

point_to_segment_dist_sqFunction · 0.85

Tested by

no test coverage detected