MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / hypot

Function hypot

std/math/src/main/float.rs:103–107  ·  view source on GitHub ↗
(coords: Args)

Source from the content-addressed store, hash-verified

101// Variadic Euclidean norm, matching `math.hypot(*coordinates)`.
102#[plugin_fn]
103fn hypot(coords: Args) -> Result<f64> {
104 let mut sum = 0.0;
105 for h in &coords.0 { let v = f64::from_handle(h.raw())?; sum += v * v; }
106 Ok(libm::sqrt(sum))
107}
108
109// Euclidean distance between two equal-length coordinate sequences.
110#[plugin_fn]

Callers

nothing calls this directly

Calls 2

sqrtFunction · 0.85
rawMethod · 0.45

Tested by

no test coverage detected