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

Function direction

nodedb-spatial/src/operations.rs:282–284  ·  view source on GitHub ↗

Direction angle (radians) from a to b.

(a: [f64; 2], b: [f64; 2])

Source from the content-addressed store, hash-verified

280
281/// Direction angle (radians) from a to b.
282fn direction(a: [f64; 2], b: [f64; 2]) -> f64 {
283 (b[1] - a[1]).atan2(b[0] - a[0])
284}
285
286/// Convert a BoundingBox to a Polygon.
287fn bbox_to_polygon(bb: &BoundingBox) -> Geometry {

Callers 1

buffer_linestringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected